redesigned payment page + a lot of fixes

This commit is contained in:
Arseni
2026-02-21 21:55:20 +03:00
parent a68aa2abff
commit 0c6fa03aba
208 changed files with 4062 additions and 2217 deletions

View File

@@ -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),
],
),
],
),
);
},
);
}