quotation rate display
This commit is contained in:
29
frontend/pweb/lib/pages/dashboard/payouts/fee_payer.dart
Normal file
29
frontend/pweb/lib/pages/dashboard/payouts/fee_payer.dart
Normal file
@@ -0,0 +1,29 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import 'package:pshared/provider/payment/amount.dart';
|
||||
|
||||
import 'package:pweb/generated/i18n/app_localizations.dart';
|
||||
|
||||
|
||||
class FeePayerSwitch extends StatelessWidget {
|
||||
final double spacing;
|
||||
final TextStyle? style;
|
||||
|
||||
const FeePayerSwitch({super.key, required this.spacing, TextStyle? this.style});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => Consumer<PaymentAmountProvider>(
|
||||
builder: (context, provider, _) => Row(
|
||||
spacing: spacing,
|
||||
children: [
|
||||
Text(AppLocalizations.of(context)!.recipientPaysFee, style: style),
|
||||
Switch(
|
||||
value: !provider.payerCoversFee,
|
||||
onChanged: (val) => provider.setPayerCoversFee(!val),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user