BankTokens class

Design tokens for the Bank UI Kit design system.

The scalar tokens are generated from the platform-neutral W3C DTCG source at tokens/design-tokens.json — the single source of truth that also feeds Figma and other platforms. Regenerate with dart run tool/generate_tokens.dart; CI fails if the two drift. The generated region covers:

Composite tokens (easing curves, text styles, numeral styles, and elevation shadows) are hand-authored below the generated region and reference the generated values. Per-brand theme tokens are serialised separately via BankThemeData.toJson into tokens/themes/ (see test/theme_export_test).

The surface / ink / border roles here are the neutral defaults a brand starts from: BankThemeData.custom seeds its palette from them, and every preset overrides them with its own brand-tinted equivalents.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

hairlineColor(Color onSurface, Brightness b) Color
Hairline colour derived from onSurface for surfaces of brightness b.
shadowCardFor(Brightness b) List<BoxShadow>
The resting card shadow appropriate for b: shadowCardDark on dark surfaces, shadowCard on light ones.
shadowFloatingFor(Brightness b) List<BoxShadow>
The floating-element shadow appropriate for b: shadowFloatingDark on dark surfaces, shadowFloating on light ones.
shadowHeroFor(Brightness b) List<BoxShadow>
The hero-surface shadow appropriate for b: shadowHeroDark on dark surfaces, shadowHero on light ones.
tintShadows(List<BoxShadow> shadows, Color tint) List<BoxShadow>
Re-inks shadows with tint, preserving each layer's alpha, blur, and offset.

Constants

alphaFaint → const double
Barely-there wash: card-face pattern inks, decorative tints.
alphaMuted → const double
Selected / pressed fill of a tinted container.
alphaScrim → const double
Half-strength: scrims behind modals, and ink that is deliberately recessive.
alphaSecondaryInk → const double
Supporting ink on a brand-coloured surface (card-face micro-labels), where a separate grey would fight the fill.
alphaSoft → const double
Resting fill of a tinted container (a brand-coloured chip or badge at rest).
alphaStrong → const double
Emphasised tinted fill — the loudest a translucent brand wash gets before it should become an opaque colour instead.
alphaSubtle → const double
Hairline-strength wash: dividers on light surfaces, resting brand tints.
bodyLarge → const TextStyle
bodyMedium → const TextStyle
bodySmall → const TextStyle
borderDivider → const Color
Rule between rows: primary ink at 8 % alpha. Translucent so it picks up whatever brand surface is behind it.
borderDividerDark → const Color
Dark-mode rule: primary ink at 14 % alpha — low-luminance contrast compresses, so dark needs more alpha for the same perceived separation.
borderOutline → const Color
Component outline: inputs, chips, unselected containers (neutral-200).
borderOutlineDark → const Color
Dark-mode component outline (neutral-700).
caption → const TextStyle
Sentence-case caption for compact metric tiles and dense metadata.
captionCaps → const TextStyle
caption prepared for an ALL-CAPS micro-label: section headers, status pills, and the "AVAILABLE BALANCE" class of label.
captionCapsWide → const TextStyle
captionCaps widened for a micro-label sitting on a card face, where the fill is large and the label needs to read as engraved rather than typed.
creditAvailable → const Color
Available credit headroom. Same family as positiveBalance / success.
creditUsed → const Color
Credit already utilised. Same family as pending / warning.
curveDecelerate → const Curve
Easing for elements entering the screen from off-canvas.
curveEmphasized → const Curve
High-energy easing for primary actions and hero elements.
curveStandard → const Curve
General-purpose easing for UI transitions.
danger → const Color
System-level danger / destructive-action on light surfaces (AA). Unified with negativeBalance.
dangerDark → const Color
System-level danger / destructive-action on dark surfaces (red-400, AA).
disabledOpacity → const double
Opacity applied to disabled interactive content (M3-aligned).
displayLarge → const TextStyle
displayMedium → const TextStyle
durationBase → const Duration
durationFast → const Duration
durationSlow → const Duration
durationXSlow → const Duration
elevationTierCard → const int
Resting cards and tiles.
elevationTierFlat → const int
Inset or flush surfaces, separated by a hairline alone.
elevationTierFloating → const int
Sheets, pickers, popovers — surfaces that overlay resting content.
elevationTierHero → const int
Payment-card faces and feature banners: the one surface per screen allowed to sit highest.
focusRingOpacity → const double
Opacity of the primary-coloured keyboard-focus ring.
focusRingWidth → const double
Stroke width of the keyboard-focus ring, in logical px.
frozen → const Color
Frozen / suspended accounts or cards.
frozenCardSaturation → const double
Saturation multiplier for frozen card faces (desaturated, not greyed out).
hairlineWidth → const double
Width of hairline separators, in logical px.
headlineLarge → const TextStyle
headlineMedium → const TextStyle
headlineSmall → const TextStyle
iconHero → const double
Empty-state and success illustrations — the only rung that carries a screen on its own.
iconLarge → const double
App-bar actions and primary controls (Material's own default).
iconMedium → const double
The default UI icon: list-tile trailing affordances, button leading icons.
iconSmall → const double
Inline with bodyMedium: leading glyphs in list rows and chips.
iconXLarge → const double
Feature glyphs inside avatars, emblems, and quick-action rings.
iconXSmall → const double
Inline with bodySmall / caption: chevrons and status pips inside dense rows.
inkFaint → const Color
Tertiary ink: placeholders and disabled labels (neutral-500). Below AA for body text by design — never use it for content.
inkFaintDark → const Color
Dark-mode tertiary ink. The same mid-grey works both ways: it is the one rung equidistant from both canvases.
inkMuted → const Color
Secondary ink: captions, metadata, supporting copy (neutral-600, AA on surface.base).
inkMutedDark → const Color
Dark-mode secondary ink (neutral-400, AA on surface.baseDark).
inkStrong → const Color
Primary ink: titles, amounts, body copy (neutral-950).
inkStrongDark → const Color
Dark-mode primary ink (neutral-50).
investmentGain → const Color
Investment gain on light surfaces. Same family as positiveBalance / success — one green per screen.
investmentGainDark → const Color
Investment gain on dark surfaces (emerald-400, AA).
investmentLoss → const Color
Investment loss on light surfaces. Same family as negativeBalance / danger.
investmentLossDark → const Color
Investment loss on dark surfaces (red-400, AA).
labelLarge → const TextStyle
labelMedium → const TextStyle
labelSmall → const TextStyle
lineHeightAiry → const double
bodyLarge — long-form copy (terms, disclosures).
lineHeightLoose → const double
bodyMedium — the default reading measure.
lineHeightNormal → const double
Labels, captions, and small numerals: single-line UI text.
lineHeightRelaxed → const double
bodySmall — dense supporting copy.
lineHeightSnug → const double
Headlines and large numerals — display text that rarely wraps.
lineHeightTight → const double
Hero numerals: a balance figure is one line, so leading is dead space.
minTapTarget → const double
Minimum touch/tap target (WCAG 2.5.5 AAA / iOS HIG).
negativeBalance → const Color
Negative / overdue amounts on light surfaces (AA).
negativeBalanceDark → const Color
Negative amounts on dark surfaces (red-400, AA).
networkAmexBlue → const Color
American Express brand blue.
networkMastercardAmber → const Color
Mastercard brand mark: amber circle.
networkMastercardBlend → const Color
Mastercard brand mark: the overlapping-lens blend colour.
networkMastercardRed → const Color
Mastercard brand mark: red circle.
neutral0 → const Color
neutral50 → const Color
neutral100 → const Color
neutral200 → const Color
neutral300 → const Color
neutral400 → const Color
neutral500 → const Color
neutral600 → const Color
neutral700 → const Color
neutral800 → const Color
neutral900 → const Color
neutral950 → const Color
numeralHero → const TextStyle
Hero monetary numeral: large balance displays.
numeralLarge → const TextStyle
Large monetary numeral: card balances and summary rows.
numeralMedium → const TextStyle
Medium monetary numeral: list items and sub-totals.
numeralSmall → const TextStyle
Small monetary numeral: dense tables and secondary figures.
pending → const Color
Pending states on light surfaces (amber-700, AA).
pendingDark → const Color
Pending states on dark surfaces (amber-400, AA).
positiveBalance → const Color
Positive balances on light surfaces (emerald-700, AA).
positiveBalanceDark → const Color
Positive balances on dark surfaces (emerald-400, AA).
pressScale → const double
Scale applied to a pressable surface while pressed.
radiusFull → const double
Fully-pill / circular shapes (chips, FABs).
radiusLarge → const double
radiusMedium → const double
radiusSmall → const double
radiusXLarge → const double
shadowCard → const List<BoxShadow>
Resting card shadow: barely-there ambient + soft key light.
shadowCardDark → const List<BoxShadow>
Dark-surface counterpart of shadowCard.
shadowFloating → const List<BoxShadow>
Hovering / floating elements: sheets, pickers, popovers.
shadowFloatingDark → const List<BoxShadow>
Dark-surface counterpart of shadowFloating.
shadowHero → const List<BoxShadow>
Hero surfaces (virtual cards, feature banners).
shadowHeroDark → const List<BoxShadow>
Dark-surface counterpart of shadowHero.
space1 → const double
space2 → const double
space3 → const double
space4 → const double
space5 → const double
space6 → const double
space8 → const double
space10 → const double
space12 → const double
space16 → const double
stateLayerFocusOpacity → const double
Keyboard-focus state-layer opacity over interactive surfaces.
stateLayerHoverOpacity → const double
Hover state-layer opacity over interactive surfaces (M3-aligned).
stateLayerPressedOpacity → const double
Pressed state-layer opacity over interactive surfaces.
success → const Color
System-level success feedback on light surfaces (emerald-700, AA). Unified with positiveBalance so one green family reads as "good" everywhere.
successDark → const Color
System-level success feedback on dark surfaces (emerald-400, AA).
surfaceBase → const Color
Default card / tile surface, one tier above the canvas (neutral-0).
surfaceBaseDark → const Color
Dark-mode card / tile surface (neutral-900).
surfaceRaised → const Color
Sheets, menus, popovers floating above a card. Identical to base on light: the tier reads through the shadow, not a tint.
surfaceRaisedDark → const Color
Dark-mode floating surface (neutral-800) — lighter than base, because dark surfaces cannot borrow depth from a shadow.
surfaceSunken → const Color
The app canvas everything else sits on (neutral-100).
surfaceSunkenDark → const Color
Dark-mode app canvas (neutral-950).
tileCompactBreakpoint → const double
Below this available width, metric tiles switch to their compact layout.
trackingCaps → const double
The standard ALL-CAPS micro-label (section headers, status pills) at caption / labelSmall size.
trackingCapsWide → const double
ALL-CAPS micro-labels on a card face, where the fill is large and the label needs to read as engraved.
trackingNumeralGroup → const double
Grouped digit runs — card numbers, reference and voucher codes — where the space is the grouping.
warning → const Color
System-level warning feedback on light surfaces (amber-700, AA). Unified with pending.
warningDark → const Color
System-level warning feedback on dark surfaces (amber-400, AA).