BankOfferSummaryCard class

A pre-acceptance summary of a financing offer.

Presents the headline periodic payment as a hero figure, a BankSummaryStack breakdown (amount, rate, term, total repayable, total interest or profit, and any fee rows), an optional representative-example line, an indicative-versus-firm chip, and the accept / adjust / decline actions.

The rate label honours islamicFinanceMode (profit rate instead of APR) unless rateLabel overrides it; likewise the interest row becomes a profit row via interestLabel. All monetary values render through BankBalanceText, so they mask automatically when privacy mode is active on the ambient BankUiScope.

BankOfferSummaryCard(
  payment: Money.fromDouble(486.20, 'SAR'),
  onAccept: acceptOffer,
  amount: Money.fromDouble(25000, 'SAR'),
  rate: '5.9%',
  term: '60 months',
  totalRepayable: Money.fromDouble(29172, 'SAR'),
  totalInterest: Money.fromDouble(4172, 'SAR'),
  firmness: BankOfferFirmness.firm,
  representativeExample: 'Representative example. 5.9% APR fixed.',
  onAdjust: adjustOffer,
)
Inheritance

Constructors

BankOfferSummaryCard({required Money payment, required VoidCallback onAccept, Key? key, Money? amount, String? rate, String? term, Money? totalRepayable, Money? totalInterest, List<BankSummaryItem> fees = const <BankSummaryItem>[], String? representativeExample, BankOfferFirmness firmness = BankOfferFirmness.indicative, VoidCallback? onAdjust, VoidCallback? onDecline, String title = 'Your offer', String periodLabel = 'per month', String amountLabel = 'Amount', String? rateLabel, String aprLabel = 'APR', String profitRateLabel = 'Profit rate', String termLabel = 'Term', String totalRepayableLabel = 'Total repayable', String? interestLabel, String totalInterestLabel = 'Total interest', String totalProfitLabel = 'Total profit', String indicativeLabel = 'Indicative', String firmLabel = 'Firm', String acceptLabel = 'Accept and continue', String adjustLabel = 'Adjust offer', String declineLabel = 'Decline', EdgeInsetsGeometry? padding, BorderRadius? radius, Color? backgroundColor, List<BoxShadow>? shadow, Color? accentColor, IconData? firmIcon, IconData? indicativeIcon, TextStyle? titleStyle, TextStyle? amountStyle, TextStyle? periodStyle, TextStyle? representativeStyle, Widget? header, Widget? footer, String? semanticLabel})
Creates a pre-acceptance offer summary card.
const

Properties

accentColor Color?
Accent for the firm chip and the primary CTA. Defaults to the theme primary.
final
acceptLabel String
Primary CTA label. Defaults to 'Accept and continue'.
final
adjustLabel String
Adjust action label. Defaults to 'Adjust offer'.
final
amount Money?
The principal / financed amount row. Hidden when null.
final
amountLabel String
Label for the amount row. Defaults to 'Amount'.
final
amountStyle TextStyle?
Merged over the hero payment style (numeralHero, onSurface).
final
aprLabel String
Rate label used outside Islamic finance mode. Defaults to 'APR'.
final
backgroundColor Color?
Overrides the card fill color. Defaults to the theme surface.
final
declineLabel String
Decline action label. Defaults to 'Decline'.
final
fees List<BankSummaryItem>
Extra fee rows appended to the breakdown, in order. Each is a BankSummaryItem so callers may render text or monetary values.
final
firmIcon IconData?
Glyph inside the firm chip. Defaults to BankIcons.success.
final
firmLabel String
Chip label for a firm offer. Defaults to 'Firm'.
final
firmness BankOfferFirmness
Whether the offer is BankOfferFirmness.indicative or BankOfferFirmness.firm. Drives the status chip.
final
Optional slot rendered below the action buttons (e.g. legal microcopy).
final
hashCode int
The hash code for this object.
no setterinherited
Replaces the built-in title / firmness header row.
final
indicativeIcon IconData?
Glyph inside the indicative chip. Defaults to BankIcons.info.
final
indicativeLabel String
Chip label for an indicative offer. Defaults to 'Indicative'.
final
interestLabel String?
Overrides the interest row label entirely. When null, resolves to totalProfitLabel in Islamic finance mode, otherwise totalInterestLabel.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onAccept VoidCallback
Fired by the primary CTA when the customer accepts the offer.
final
onAdjust VoidCallback?
Optional secondary action to adjust the offer. Hidden when null.
final
onDecline VoidCallback?
Optional secondary action to decline the offer. Hidden when null.
final
padding EdgeInsetsGeometry?
Overrides the content padding. Defaults to EdgeInsets.all(BankTokens.space4).
final
payment Money
The headline periodic payment (e.g. the monthly instalment).
final
periodLabel String
Suffix shown after the hero payment. Defaults to 'per month'.
final
periodStyle TextStyle?
Merged over the period-suffix style (bodyMedium, onSurfaceVariant).
final
profitRateLabel String
Rate label used in Islamic finance mode. Defaults to 'Profit rate'.
final
radius BorderRadius?
Overrides the card corner radius. Defaults to the theme cardRadius.
final
rate String?
The rate value shown against the rate label (e.g. '5.9%'). The caller formats the figure; hidden when null.
final
rateLabel String?
Overrides the rate row label entirely. When null, resolves to profitRateLabel in Islamic finance mode, otherwise aprLabel.
final
representativeExample String?
Representative-example / disclosure microcopy shown in a quiet style beneath the breakdown. Hidden when null.
final
representativeStyle TextStyle?
Merged over the representative-example style (bodySmall, onSurfaceVariant).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel String?
Overrides the accessibility label announced for the offer heading.
final
shadow List<BoxShadow>?
Overrides the card shadow. Defaults to BankTokens.shadowCard; pass const [] to flatten.
final
term String?
The term / tenor value (e.g. '60 months'). Hidden when null.
final
termLabel String
Label for the term row. Defaults to 'Term'.
final
title String
Card heading. Defaults to 'Your offer'.
final
titleStyle TextStyle?
Merged over the computed title style (headlineSmall, onSurface).
final
totalInterest Money?
Total interest (or profit) payable. Hidden when null.
final
totalInterestLabel String
Interest row label outside Islamic finance mode. Defaults to 'Total interest'.
final
totalProfitLabel String
Interest row label in Islamic finance mode. Defaults to 'Total profit'.
final
totalRepayable Money?
Total amount repayable over the term. Hidden when null.
final
totalRepayableLabel String
Label for the total-repayable row. Defaults to 'Total repayable'.
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited