BankCardControlsPanel class

Panel of toggles and controls for managing a payment card.

Renders a scrollable Column of control rows organised into two groups:

  1. Toggle rows for freeze, online payments, contactless, and international.
  2. An optional spend-limit Slider when onSpendLimitChanged is provided.
  3. Action rows for PIN change and reporting the card lost or stolen.

All toggles use BankThemeData.primary as their active colour. Each row meets the 44 × 44 px WCAG minimum tap-target requirement.

Inheritance

Constructors

BankCardControlsPanel({required bool isFrozen, required bool isOnlinePaymentsEnabled, required bool isContactlessEnabled, required bool isInternationalEnabled, required ValueChanged<bool> onFreezeChanged, required ValueChanged<bool> onOnlinePaymentsChanged, required ValueChanged<bool> onContactlessChanged, required ValueChanged<bool> onInternationalChanged, Key? key, double? spendLimit, double maxSpendLimit = 10000, ValueChanged<double>? onSpendLimitChanged, VoidCallback? onChangePinTap, VoidCallback? onReportLostOrStolen, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? rowPadding, Color? accentColor, Color? foregroundColor, TextStyle? labelStyle, TextStyle? subtitleStyle, TextStyle? limitValueStyle, IconData freezeIcon = BankIcons.cardFreeze, IconData onlinePaymentsIcon = BankIcons.cardOnline, IconData contactlessIcon = BankIcons.cardContactless, IconData internationalIcon = BankIcons.cardInternational, IconData spendLimitIcon = BankIcons.cardLimit, IconData changePinIcon = BankIcons.lock, IconData reportLostOrStolenIcon = BankIcons.warning, IconData forwardIcon = BankIcons.forward, String freezeLabel = 'Freeze Card', String freezeSubtitle = 'Temporarily block all transactions', String onlinePaymentsLabel = 'Online Payments', String onlinePaymentsSubtitle = 'Allow card-not-present purchases', String contactlessLabel = 'Contactless Payments', String contactlessSubtitle = 'Tap-to-pay via NFC', String internationalLabel = 'International Payments', String internationalSubtitle = 'Use card outside home country', String spendLimitLabel = 'Spend Limit', String noLimitLabel = 'No limit', String? spendLimitSemanticLabel, String changePinLabel = 'Change PIN', String reportLostOrStolenLabel = 'Report Lost or Stolen', String enabledSemanticValue = 'enabled', String disabledSemanticValue = 'disabled', String? semanticLabel})
const

Properties

accentColor Color?
Overrides the active colour of switches and the slider. Defaults to BankThemeData.primary.
final
changePinIcon IconData
Icon of the change PIN action row. Defaults to BankIcons.lock.
final
changePinLabel String
Label of the change PIN action row. Defaults to 'Change PIN'.
final
contactlessIcon IconData
Icon of the contactless row. Defaults to BankIcons.cardContactless.
final
contactlessLabel String
Label of the contactless toggle. Defaults to 'Contactless Payments'.
final
contactlessSubtitle String
Subtitle of the contactless toggle. Defaults to 'Tap-to-pay via NFC'.
final
disabledSemanticValue String
Semantics value announced for a toggle that is off. Defaults to 'disabled'.
final
enabledSemanticValue String
Semantics value announced for a toggle that is on. Defaults to 'enabled'.
final
foregroundColor Color?
Overrides the row label colour. Defaults to BankThemeData.onSurface.
final
forwardIcon IconData
Trailing chevron of the action rows. Defaults to BankIcons.forward.
final
freezeIcon IconData
Icon of the freeze row. Defaults to BankIcons.cardFreeze.
final
freezeLabel String
Label of the freeze toggle. Defaults to 'Freeze Card'.
final
freezeSubtitle String
Subtitle of the freeze toggle. Defaults to 'Temporarily block all transactions'.
final
hashCode int
The hash code for this object.
no setterinherited
internationalIcon IconData
Icon of the international row. Defaults to BankIcons.cardInternational.
final
internationalLabel String
Label of the international toggle. Defaults to 'International Payments'.
final
internationalSubtitle String
Subtitle of the international toggle. Defaults to 'Use card outside home country'.
final
isContactlessEnabled bool
final
isFrozen bool
final
isInternationalEnabled bool
final
isOnlinePaymentsEnabled bool
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelStyle TextStyle?
Merged over the computed row label style (BankTokens.labelLarge).
final
limitValueStyle TextStyle?
Merged over the spend-limit value style (BankTokens.bodyMedium).
final
maxSpendLimit double
Maximum value for the spend-limit slider.
final
noLimitLabel String
Text shown when no spend limit is set. Defaults to 'No limit'.
final
onChangePinTap VoidCallback?
Called when the user taps "Change PIN". No-op when null.
final
onContactlessChanged ValueChanged<bool>
final
onFreezeChanged ValueChanged<bool>
final
onInternationalChanged ValueChanged<bool>
final
onlinePaymentsIcon IconData
Icon of the online payments row. Defaults to BankIcons.cardOnline.
final
onlinePaymentsLabel String
Label of the online payments toggle. Defaults to 'Online Payments'.
final
onlinePaymentsSubtitle String
Subtitle of the online payments toggle. Defaults to 'Allow card-not-present purchases'.
final
onOnlinePaymentsChanged ValueChanged<bool>
final
onReportLostOrStolen VoidCallback?
Called when the user taps "Report Lost or Stolen". No-op when null.
final
onSpendLimitChanged ValueChanged<double>?
When non-null, a spend-limit slider is shown below the toggles.
final
padding EdgeInsetsGeometry?
Overrides the outer padding around the panel. Defaults to none.
final
reportLostOrStolenIcon IconData
Icon of the report lost or stolen row. Defaults to BankIcons.warning.
final
reportLostOrStolenLabel String
Label of the report action row. Defaults to 'Report Lost or Stolen'.
final
rowPadding EdgeInsetsGeometry?
Overrides the inner padding of every row. Defaults to each row's current symmetric BankTokens spacing.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel String?
Semantics label wrapped around the whole panel. Defaults to none.
final
spendLimit double?
Current spend-limit value. null means no limit is set.
final
spendLimitIcon IconData
Icon of the spend-limit row. Defaults to BankIcons.cardLimit.
final
spendLimitLabel String
Heading of the spend-limit row. Defaults to 'Spend Limit'.
final
spendLimitSemanticLabel String?
Overrides the spend-limit row semantics label. Defaults to 'Spend limit: <current value>'.
final
subtitleStyle TextStyle?
Merged over the computed subtitle style (BankTokens.bodySmall).
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