BankEmptyStateView class

Full-viewport empty-state widget.

Displays an illustration, a required title, an optional subtitle, and an optional call-to-action FilledButton.

The layout is a vertically and horizontally centred Column. If illustration is non-null it is shown with a maximum height of 180 px and a BankTokens.space6 gap below it. When illustration is null a themed fallback is drawn instead: a soft circle tinted with the theme primary colour holding a brand-tinted glyph, so empty moments never render as a bare wireframe.

BankEmptyStateView(
  illustration: Image.asset('assets/empty_transactions.png'),
  title: 'No transactions yet',
  subtitle: 'Your payments and transfers will appear here.',
  actionLabel: 'Make a Payment',
  onAction: () => navigator.push(PaymentRoute()),
)
Inheritance

Constructors

BankEmptyStateView({required String title, Key? key, Widget? illustration, IconData? emptyIcon, String? subtitle, String? actionLabel, VoidCallback? onAction, EdgeInsetsGeometry? padding, Color? accentColor, TextStyle? titleStyle, TextStyle? subtitleStyle, String? semanticLabel})
const

Properties

accentColor Color?
Background of the call-to-action button and tint of the default illustration fallback. Defaults to BankThemeData.primary.
final
actionLabel String?
Label for the call-to-action button. Only shown when onAction is also non-null.
final
emptyIcon IconData?
Glyph of the default illustration fallback shown when illustration is null. Defaults to Icons.inbox_outlined.
final
hashCode int
The hash code for this object.
no setterinherited
illustration Widget?
Optional illustration widget placed above the title.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onAction VoidCallback?
Callback invoked when the call-to-action button is tapped.
final
padding EdgeInsetsGeometry?
Overrides the content padding. Defaults to EdgeInsets.symmetric(horizontal: BankTokens.space8).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel String?
Container semantics label for the whole view. Defaults to none (children are read individually, as today).
final
subtitle String?
Optional supporting sentence beneath the title.
final
subtitleStyle TextStyle?
Merged over the computed subtitle style (BankTokens.bodyMedium in BankThemeData.onSurfaceVariant).
final
title String
Short descriptive title. Required.
final
titleStyle TextStyle?
Merged over the computed title style (BankTokens.headlineMedium in BankThemeData.onSurface).
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