redesigned payment page + a lot of fixes
This commit is contained in:
@@ -15,15 +15,30 @@ class FeePayerSwitch extends StatelessWidget {
|
||||
|
||||
@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),
|
||||
builder: (context, provider, _) {
|
||||
final recipientPaysFee = !provider.payerCoversFee;
|
||||
final textStyle = style ?? Theme.of(context).textTheme.bodySmall;
|
||||
void updateRecipientPaysFee(bool value) {
|
||||
provider.setPayerCoversFee(!value);
|
||||
}
|
||||
|
||||
return InkWell(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
onTap: () => updateRecipientPaysFee(!recipientPaysFee),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Checkbox(
|
||||
value: recipientPaysFee,
|
||||
onChanged: (val) => updateRecipientPaysFee(val ?? false),
|
||||
visualDensity: VisualDensity.compact,
|
||||
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
),
|
||||
SizedBox(width: spacing),
|
||||
Text(AppLocalizations.of(context)!.recipientPaysFee, style: textStyle),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user