BankRoundUpSettingsSheet constructor
const
BankRoundUpSettingsSheet({
- required bool isEnabled,
- required int multiplier,
- required List<
SavingsPot> availablePots, - required ValueChanged<
bool> onEnabledChanged, - required ValueChanged<
int> onMultiplierChanged, - required ValueChanged<
String?> onPotSelected, - Key? key,
- String? selectedPotId,
- String title = 'Round Up Spare Change',
- String multiplierSectionLabel = 'Round up by',
- String potSectionLabel = 'Save to',
- String emptyPotsLabel = 'No savings pots available. Create a pot first.',
- String goalTemplate = 'Goal: {amount}',
- String potSemanticTemplate = '{pot}, goal {amount}',
- String multiplierTemplate = '{n}×',
- String multiplierSemanticTemplate = '{n}x multiplier',
- String enabledSemanticLabel = 'Round Up enabled',
- String disabledSemanticLabel = 'Round Up disabled',
- String explanationTemplate = 'We\'ll round up every purchase to the ' 'nearest £1 and save the difference{multiplier} automatically.',
- BorderRadius? radius,
- Color? backgroundColor,
- Color? accentColor,
- TextStyle? titleStyle,
- IconData? titleIcon,
- IconData? potIcon,
- IconData? selectedIcon,
- IconData? infoIcon,
- Duration? animationDuration,
- Curve? animationCurve,
Implementation
const BankRoundUpSettingsSheet({
required this.isEnabled,
required this.multiplier,
required this.availablePots,
required this.onEnabledChanged,
required this.onMultiplierChanged,
required this.onPotSelected,
super.key,
this.selectedPotId,
this.title = 'Round Up Spare Change',
this.multiplierSectionLabel = 'Round up by',
this.potSectionLabel = 'Save to',
this.emptyPotsLabel = 'No savings pots available. Create a pot first.',
this.goalTemplate = 'Goal: {amount}',
this.potSemanticTemplate = '{pot}, goal {amount}',
this.multiplierTemplate = '{n}×',
this.multiplierSemanticTemplate = '{n}x multiplier',
this.enabledSemanticLabel = 'Round Up enabled',
this.disabledSemanticLabel = 'Round Up disabled',
this.explanationTemplate = 'We\'ll round up every purchase to the '
'nearest £1 and save the difference{multiplier} automatically.',
this.radius,
this.backgroundColor,
this.accentColor,
this.titleStyle,
this.titleIcon,
this.potIcon,
this.selectedIcon,
this.infoIcon,
this.animationDuration,
this.animationCurve,
}) : assert(
multiplier == 1 ||
multiplier == 2 ||
multiplier == 5 ||
multiplier == 10,
'multiplier must be 1, 2, 5, or 10',
);