BankPotContributionSheet constructor

const BankPotContributionSheet({
  1. required SavingsPot pot,
  2. required Future<void> onConfirm(
    1. Money amount
    ),
  3. Key? key,
  4. bool isWithdrawal = false,
  5. Money? availableBalance,
  6. VoidCallback? onCancel,
  7. String addTitleTemplate = 'Add to {pot}',
  8. String withdrawTitleTemplate = 'Withdraw from {pot}',
  9. String closeTooltip = 'Close',
  10. String maxContributionTemplate = 'Maximum contribution is {amount} to reach your goal',
  11. String maxWithdrawalTemplate = 'You can withdraw at most {amount}',
  12. String maxAvailableTemplate = 'Cannot exceed available balance of {amount}',
  13. String availableTemplate = 'Available: {amount}',
  14. String goalSavedTemplate = 'Goal: {target} · Saved: {saved}',
  15. String addButtonLabel = 'Add Money',
  16. String withdrawButtonLabel = 'Withdraw',
  17. String confirmContributionSemanticLabel = 'Confirm contribution',
  18. String confirmWithdrawalSemanticLabel = 'Confirm withdrawal',
  19. String invalidAmountSemanticLabel = 'Enter a valid amount to continue',
  20. String decimalKeySemanticLabel = 'Decimal point',
  21. String deleteKeySemanticLabel = 'Delete',
  22. BorderRadius? radius,
  23. Color? backgroundColor,
  24. Color? accentColor,
  25. TextStyle? titleStyle,
  26. TextStyle? amountStyle,
  27. IconData? closeIcon,
  28. IconData? deleteKeyIcon,
  29. Duration? animationDuration,
  30. Curve? animationCurve,
})

Implementation

const BankPotContributionSheet({
  required this.pot,
  required this.onConfirm,
  super.key,
  this.isWithdrawal = false,
  this.availableBalance,
  this.onCancel,
  this.addTitleTemplate = 'Add to {pot}',
  this.withdrawTitleTemplate = 'Withdraw from {pot}',
  this.closeTooltip = 'Close',
  this.maxContributionTemplate =
      'Maximum contribution is {amount} to reach your goal',
  this.maxWithdrawalTemplate = 'You can withdraw at most {amount}',
  this.maxAvailableTemplate = 'Cannot exceed available balance of {amount}',
  this.availableTemplate = 'Available: {amount}',
  this.goalSavedTemplate = 'Goal: {target} · Saved: {saved}',
  this.addButtonLabel = 'Add Money',
  this.withdrawButtonLabel = 'Withdraw',
  this.confirmContributionSemanticLabel = 'Confirm contribution',
  this.confirmWithdrawalSemanticLabel = 'Confirm withdrawal',
  this.invalidAmountSemanticLabel = 'Enter a valid amount to continue',
  this.decimalKeySemanticLabel = 'Decimal point',
  this.deleteKeySemanticLabel = 'Delete',
  this.radius,
  this.backgroundColor,
  this.accentColor,
  this.titleStyle,
  this.amountStyle,
  this.closeIcon,
  this.deleteKeyIcon,
  this.animationDuration,
  this.animationCurve,
});