BankBalanceTile class
A compact metric tile pairing a caption with a formatted Money value — the "Available Balance" / "Savings" tiles that sit under a card carousel.
The caption renders exactly as given (sentence case is the house style at
this width; callers wanting micro-caps pass an uppercase string plus
labelStyle) and wraps up to labelMaxLines lines before ellipsizing.
The amount is rendered with BankBalanceText, so it formats currency,
respects the numeral style, and masks under privacy mode automatically.
Optionally shows a leading icon disc and a trend chip (e.g. '+2.4%').
Pair several in a BankBalanceTileRow.
BankBalanceTile(
label: 'Available Balance',
amount: Money.fromDouble(3565.00, 'GBP'),
icon: Icons.account_balance_wallet_outlined,
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- BankBalanceTile
Constructors
- BankBalanceTile({required String label, required Money amount, Key? key, IconData? icon, String? trend, bool trendPositive = true, VoidCallback? onTap, Color? backgroundColor, Color? accentColor, Color? borderColor, BorderRadius? radius, EdgeInsetsGeometry? padding, TextStyle? labelStyle, TextStyle? amountStyle, int labelMaxLines = 2, double? width, String? semanticLabel})
-
const
Properties
- accentColor → Color?
-
Icon/trend accent. Defaults to BankThemeData.primary.
final
- amount → Money
-
The value shown as the hero.
final
- amountStyle → TextStyle?
-
Merged over the amount's numeral style
(BankThemeData.numeralMedium in BankThemeData.onSurface).
final
- backgroundColor → Color?
-
Tile fill. Defaults to BankThemeData.surface.
final
- borderColor → Color?
-
Border colour. Defaults to a faint outline.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → IconData?
-
Optional leading icon shown in a tinted disc.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String
-
Caption above the amount. Rendered verbatim — no case transformation.
final
- labelMaxLines → int
-
Maximum caption lines before ellipsizing. Defaults to
2so long or localized captions wrap whole words instead of truncating mid-word.final - labelStyle → TextStyle?
-
Merged over the computed caption style (BankTokens.caption in
BankThemeData.onSurfaceVariant).
final
- onTap → VoidCallback?
-
Tap handler (e.g. route to account detail).
final
- padding → EdgeInsetsGeometry?
-
Inner padding. Defaults to BankTokens.space4.
final
- radius → BorderRadius?
-
Corner radius. Defaults to BankThemeData.cardRadius.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticLabel → String?
-
The tile's semantics label. Defaults to label (the caption) so a
tappable tile has an accessible name.
final
- trend → String?
-
Optional trend chip text (e.g.
'+2.4%'). Hidden when null.final - trendPositive → bool
-
Colours the trend chip positive (accent) or negative.
final
- width → double?
-
Fixed width (used by a scrollable BankBalanceTileRow).
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