BankSavingsProjectionCard constructor
const
BankSavingsProjectionCard({
- required String currencyCode,
- required double annualRate,
- Key? key,
- double initialAmount = 1000,
- double minAmount = 100,
- double maxAmount = 50000,
- double amountStep = 100,
- int minMonths = 1,
- int maxMonths = 36,
- int initialMonths = 12,
- void onApply()?,
- String title = 'Savings projection',
- String amountLabel = 'Deposit amount',
- String monthsTemplate = '{n} months',
- String depositLabel = 'Deposit',
- String rateLabel = 'Interest rate (AER)',
- String profitRateLabel = 'Expected profit rate',
- String earningsLabel = 'Interest earned',
- String profitEarningsLabel = 'Expected profit',
- String totalLabel = 'Total at maturity',
- String applyLabel = 'Start saving',
- EdgeInsetsGeometry? padding,
- BorderRadius? radius,
- Color? backgroundColor,
- Color? accentColor,
- List<
BoxShadow> ? shadow, - TextStyle? titleStyle,
- TextStyle? amountStyle,
Creates a savings projection calculator card.
Implementation
const BankSavingsProjectionCard({
required this.currencyCode,
required this.annualRate,
super.key,
this.initialAmount = 1000,
this.minAmount = 100,
this.maxAmount = 50000,
this.amountStep = 100,
this.minMonths = 1,
this.maxMonths = 36,
this.initialMonths = 12,
this.onApply,
this.title = 'Savings projection',
this.amountLabel = 'Deposit amount',
this.monthsTemplate = '{n} months',
this.depositLabel = 'Deposit',
this.rateLabel = 'Interest rate (AER)',
this.profitRateLabel = 'Expected profit rate',
this.earningsLabel = 'Interest earned',
this.profitEarningsLabel = 'Expected profit',
this.totalLabel = 'Total at maturity',
this.applyLabel = 'Start saving',
this.padding,
this.radius,
this.backgroundColor,
this.accentColor,
this.shadow,
this.titleStyle,
this.amountStyle,
}) : assert(annualRate >= 0, 'annualRate must not be negative.'),
assert(minAmount > 0, 'minAmount must be positive.'),
assert(minAmount < maxAmount, 'minAmount must be below maxAmount.'),
assert(amountStep > 0, 'amountStep must be positive.'),
assert(minMonths >= 1, 'minMonths must be at least 1.'),
assert(
minMonths <= maxMonths,
'minMonths must not exceed maxMonths.',
);