BankInsightCard class

A swipeable AI-generated insight card with a labelled confidence meter.

The meter is bars plus wording rather than the three dots it used to be: dots at the foot of a card read as carousel pagination, and they left the model's confidence encoded in nothing but position and hue.

Inheritance

Constructors

BankInsightCard({required BankInsight insight, Key? key, VoidCallback? onTap, VoidCallback? onDismiss, VoidCallback? onAction, String? actionLabel, EdgeInsetsGeometry? padding, BorderRadius? radius, Color? backgroundColor, double? elevation, List<BoxShadow>? shadow, BoxBorder? border, Color? accentColor, IconData? icon, TextStyle? titleStyle, TextStyle? bodyStyle, IconData? dismissIcon, String dismissLabel = 'Dismiss insight', bool showConfidence = true, String confidenceLabelBuilder(InsightConfidence confidence)?, String confidenceSemanticLabel = 'Insight confidence', TextStyle? confidenceLabelStyle, String? semanticLabel})
const

Properties

accentColor → Color?
Overrides the confidence-driven tint (leading glyph, badge circle, and the confidence meter bars).
final
actionLabel → String?
final
backgroundColor → Color?
Overrides the card fill colour. Defaults to the theme surface.
final
bodyStyle → TextStyle?
Merged over the insight body style (bodySmall, onSurfaceVariant).
final
border → BoxBorder?
Overrides the card outline. Defaults on dark surfaces to a BankTokens.hairlineWidth hairline in BankTokens.hairlineColor; light surfaces keep an invisible border of the same width. Pass const Border() to remove it.
final
confidenceLabelBuilder → String Function(InsightConfidence confidence)?
Supplies the confidence wording, shown and announced. Defaults to 'High confidence' / 'Medium confidence' / 'Low confidence'.
final
confidenceLabelStyle → TextStyle?
Merged over the confidence label style (BankTokens.caption in BankThemeData.onSurfaceVariant).
final
confidenceSemanticLabel → String
Accessible name of the confidence meter, announced ahead of the level from confidenceLabelBuilder. Defaults to 'Insight confidence'.
final
dismissIcon → IconData?
Overrides the dismiss glyph. Defaults to Icons.close.
final
dismissLabel → String
Semantics label for the dismiss button. Defaults to 'Dismiss insight'.
final
elevation → double?
Legacy depth opt-out. The card renders the kit shadow language (BankTokens.shadowCardFor of the theme background brightness) instead of Material elevation; pass 0 — or use a theme whose elevationLow is 0, such as Voltage — to flatten the card to hairline-only depth.
final
hashCode → int
The hash code for this object.
no setterinherited
icon → IconData?
Overrides the confidence-driven leading glyph.
final
insight → BankInsight
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onAction → VoidCallback?
final
onDismiss → VoidCallback?
final
onTap → VoidCallback?
final
padding → EdgeInsetsGeometry?
Overrides the card content padding. Defaults to space4 all round.
final
radius → BorderRadius?
Overrides the card corner radius. Defaults to the theme cardRadius.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel → String?
Overrides the card semantics label. Defaults to title and body.
final
shadow → List<BoxShadow>?
Overrides the card shadow. Defaults to BankTokens.shadowCardFor of the theme background brightness; pass const [] to flatten.
final
showConfidence → bool
Whether to render the confidence meter. Defaults to true.
final
titleStyle → TextStyle?
Merged over the insight title style (labelLarge, 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