BankSkeletonLoader class

Shimmer-effect placeholder that takes the shape of common Bank UI Kit surfaces while data loads.

The shimmer is a lighter band travelling across the placeholder blocks, composited with BlendMode.srcATop so it paints only where a placeholder actually is: the highlight travels through the shapes and never appears in the gaps between them. Stacked tiles are phase-offset by phaseOffset, so a list ripples instead of pulsing in unison.

Under MediaQuery.disableAnimationsOf the widget renders static placeholders and no animation controller runs at all — a shimmer is pure decoration, and users who asked for stillness should get nothing moving.

When count > 1 the widget stacks count copies vertically with itemSpacing gaps between them. Pass shape to shimmer a bespoke composition instead of a variant; build it out of BankSkeletonBox so the fill colour matches the built-in shapes.

Wrapped in a Semantics carrying semanticLabel, with its children kept out of the accessibility tree via ExcludeSemantics.

BankSkeletonLoader(
  variant: BankSkeletonVariant.transactionTile,
  count: 5,
)
Inheritance

Constructors

BankSkeletonLoader({Key? key, BankSkeletonVariant variant = BankSkeletonVariant.generic, int count = 1, double? width, double? height, Color? baseColor, Color? highlightColor, Color? surfaceColor, BorderRadius? radius, double? itemSpacing, Duration? animationDuration, double phaseOffset = 0.12, Widget? shape, String semanticLabel = 'Loading…'})
const

Properties

animationDuration → Duration?
Duration of one shimmer sweep. Defaults to twice BankTokens.durationXSlow — a shimmer is ambient rather than reactive, so it runs slower than any interaction transition in the kit.
final
baseColor → Color?
Overrides the placeholder fill. Defaults to BankThemeData.onSurface at BankTokens.alphaSoft composited over surfaceColor — an opaque tone rather than a translucent wash, so the block does not change value with whatever it happens to sit on.
final
count → int
How many tiles to show stacked vertically.
final
hashCode → int
The hash code for this object.
no setterinherited
height → double?
Explicit height for BankSkeletonVariant.generic. Defaults to 80.
final
highlightColor → Color?
Overrides the travelling highlight, painted over baseColor.
final
itemSpacing → double?
Vertical gap between stacked copies. Defaults to BankTokens.space2.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
phaseOffset → double
Fraction of one sweep by which each stacked tile lags the one above it.
final
radius → BorderRadius?
Overrides the placeholder corner radius. Defaults to BankThemeData.cardRadius for the card variants and BankTokens.radiusMedium otherwise.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel → String
Semantics label announced while loading. Defaults to 'Loading…'.
final
shape → Widget?
A bespoke placeholder composition to shimmer instead of variant.
final
surfaceColor → Color?
The surface the placeholder is painted on, used to resolve baseColor and the highlight strength. Defaults to BankThemeData.surface; pass BankThemeData.background when the skeleton sits on the bare canvas.
final
variant → BankSkeletonVariant
Which shape to mimic. Ignored when shape is non-null.
final
width → double?
Explicit width for BankSkeletonVariant.generic. Defaults to double.infinity.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<BankSkeletonLoader>
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