BankPerksMarketplaceCard class

Marketplace card for a single partner perk.

Shows the partner logo (or initials fallback), title, discount badge, expiry hint, and an "Activate" button or "Activated" chip based on state.

Inheritance

Constructors

BankPerksMarketplaceCard({required BankPerk perk, Key? key, VoidCallback? onActivate, VoidCallback? onTap, EdgeInsetsGeometry? padding, BorderRadius? radius, Color? backgroundColor, Color? accentColor, List<BoxShadow>? shadow, TextStyle? titleStyle, TextStyle? partnerStyle, TextStyle? descriptionStyle, double? logoRadius, IconData? activatedIcon, String activateLabel = 'Activate', String activatedLabel = 'Activated', String expiredLabel = 'Expired', String expiresTodayLabel = 'Expires today', String expiresTomorrowLabel = 'Expires tomorrow', String expiresInDaysTemplate = 'Expires in {n} days', String expiresInMonthLabel = 'Expires in 1 month', String expiresInMonthsTemplate = 'Expires in {n} months', String? semanticLabel})
const

Properties

accentColor Color?
Overrides the accent used for the initials avatar, tap splash and activate button. Defaults to the theme primary.
final
activatedIcon IconData?
Glyph beside the activated label. Defaults to Icons.check_circle.
final
activatedLabel String
Activated chip label. Defaults to 'Activated'.
final
activateLabel String
Activate button label. Defaults to 'Activate'.
final
backgroundColor Color?
Overrides the card background color. Defaults to the theme surface.
final
descriptionStyle TextStyle?
Merged over the description style (BankTokens.bodySmall in onSurfaceVariant).
final
expiredLabel String
Expiry text once past BankPerk.expiresAt. Defaults to 'Expired'.
final
expiresInDaysTemplate String
Expiry text within 30 days; {n} is substituted. Defaults to 'Expires in {n} days'.
final
expiresInMonthLabel String
Expiry text at exactly one month. Defaults to 'Expires in 1 month'.
final
expiresInMonthsTemplate String
Expiry text beyond one month; {n} is substituted. Defaults to 'Expires in {n} months'.
final
expiresTodayLabel String
Expiry text on the final day. Defaults to 'Expires today'.
final
expiresTomorrowLabel String
Expiry text one day before. Defaults to 'Expires tomorrow'.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
logoRadius double?
Radius of the partner logo avatar. Defaults to 24.
final
onActivate VoidCallback?
final
onTap VoidCallback?
final
padding EdgeInsetsGeometry?
Overrides the card content padding. Defaults to EdgeInsets.all(BankTokens.space4).
final
partnerStyle TextStyle?
Merged over the partner-name style (BankTokens.bodySmall in onSurfaceVariant).
final
perk BankPerk
final
radius BorderRadius?
Overrides the card corner radius. Defaults to the theme cardRadius.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel String?
Overrides the generated card semantics label. Supply for non-English locales.
final
shadow List<BoxShadow>?
Overrides the card shadow. Defaults to a soft black drop shadow; pass const [] to flatten.
final
titleStyle TextStyle?
Merged over the perk title style (BankTokens.labelLarge in onSurface).
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<BankPerksMarketplaceCard>
Creates the mutable state for this widget at a given location in the tree.
override
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