BankPotContributionSheet constructor
const
BankPotContributionSheet({
- required SavingsPot pot,
- required Future<
void> onConfirm(- Money amount
- Key? key,
- bool isWithdrawal = false,
- Money? availableBalance,
- VoidCallback? onCancel,
- String addTitleTemplate = 'Add to {pot}',
- String withdrawTitleTemplate = 'Withdraw from {pot}',
- String closeTooltip = 'Close',
- String maxContributionTemplate = 'Maximum contribution is {amount} to reach your goal',
- String maxWithdrawalTemplate = 'You can withdraw at most {amount}',
- String maxAvailableTemplate = 'Cannot exceed available balance of {amount}',
- String availableTemplate = 'Available: {amount}',
- String goalSavedTemplate = 'Goal: {target} · Saved: {saved}',
- String addButtonLabel = 'Add Money',
- String withdrawButtonLabel = 'Withdraw',
- String confirmContributionSemanticLabel = 'Confirm contribution',
- String confirmWithdrawalSemanticLabel = 'Confirm withdrawal',
- String invalidAmountSemanticLabel = 'Enter a valid amount to continue',
- String decimalKeySemanticLabel = 'Decimal point',
- String deleteKeySemanticLabel = 'Delete',
- BorderRadius? radius,
- Color? backgroundColor,
- Color? accentColor,
- TextStyle? titleStyle,
- TextStyle? amountStyle,
- IconData? closeIcon,
- IconData? deleteKeyIcon,
- Duration? animationDuration,
- 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,
});