BankPhysicalCardMaterialPicker class

Horizontal card-design picker for the order-a-card flow.

Displays each BankCardDesignOption as a mini card preview (80 × 50 px) with a material badge and a label below. The currently selected option is ringed in BankThemeData.primary. Metal options show a diagonal shimmer band using ShaderMask.

Accessibility: each card option is wrapped in a Semantics node that describes the design name, material, and selected state.

Inheritance

Constructors

BankPhysicalCardMaterialPicker({required List<BankCardDesignOption> options, required ValueChanged<BankCardDesignOption> onSelected, Key? key, String? selectedId, EdgeInsetsGeometry? padding, double? itemSpacing, double? previewWidth, double? previewHeight, double? previewRadius, Color? accentColor, Color? metalBadgeColor, Color? plasticBadgeColor, String metalBadgeLabel = 'METAL', String plasticBadgeLabel = 'PLASTIC', TextStyle? badgeStyle, TextStyle? labelStyle, Gradient? shimmerGradient, String optionSemanticTemplate = '{label}, {material} card', String selectedSemanticLabel = 'selected', String? semanticLabel})
const

Properties

accentColor Color?
Overrides the selection ring and selected label color. Defaults to BankThemeData.primary.
final
badgeStyle TextStyle?
Merged over the badge text style (BankTokens.labelSmall in white at 8 px), so partial overrides work.
final
hashCode int
The hash code for this object.
no setterinherited
itemSpacing double?
Overrides the gap between options. Defaults to BankTokens.space3.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelStyle TextStyle?
Merged over the option label style (BankTokens.bodySmall in the selection-dependent color and weight).
final
metalBadgeColor Color?
Overrides the metal badge background. Defaults to the neutral grey Color(0xFF8E8E93).
final
metalBadgeLabel String
Badge text for metal options. Defaults to 'METAL'.
final
onSelected ValueChanged<BankCardDesignOption>
final
options List<BankCardDesignOption>
final
optionSemanticTemplate String
Template for each option's semantics label; {label} and {material} are replaced. Defaults to '{label}, {material} card'.
final
padding EdgeInsetsGeometry?
Overrides the list's outer padding. Defaults to BankTokens.space4 horizontally.
final
plasticBadgeColor Color?
Overrides the plastic badge background. Defaults to the indigo Color(0xFF6C63FF).
final
plasticBadgeLabel String
Badge text for plastic options. Defaults to 'PLASTIC'.
final
previewHeight double?
Overrides the mini card preview height. Defaults to 50.
final
previewRadius double?
Overrides the preview corner radius. Defaults to 6.
final
previewWidth double?
Overrides the mini card preview width. Defaults to 80.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedId String?
final
selectedSemanticLabel String
Suffix appended to the selected option's semantics label. Defaults to 'selected'.
final
semanticLabel String?
Semantics label wrapping the whole picker. Defaults to none.
final
shimmerGradient Gradient?
Overrides the static metal shimmer gradient. Defaults to the kit's diagonal white highlight band.
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