BankPlanComparisonTable class

Side-by-side plan tier comparison table.

The table scrolls horizontally whenever its natural width (the label column plus one column per tier) exceeds the space it is given — tier count is a poor proxy for that, and going by it is how three wide columns used to clip off-screen in silence. While columns remain off-screen the corresponding edge fades out, so the row of tiers reads as continuing rather than ending; see showEdgeFade.

Each tier header is tappable when onSelectTier is provided. The tier identified by highlightedTierId is framed by a closed BankTokens.radiusMedium emphasis border in highlightColor, drawn as an overlay so the emphasised column keeps the exact geometry of its neighbours and its rows stay on the same baselines.

Inheritance

Constructors

BankPlanComparisonTable({required List<BankPlanTier> tiers, Key? key, String? highlightedTierId, ValueChanged<BankPlanTier>? onSelectTier, double? columnWidth, double? labelColumnWidth, double? rowHeight, double? headerHeight, Color? highlightColor, Color? accentColor, Color? includedColor, Color? excludedColor, Color? partialColor, IconData? includedIcon, IconData? excludedIcon, IconData? partialIcon, TextStyle? featureLabelStyle, TextStyle? tierNameStyle, TextStyle? priceStyle, String perMonthLabel = '/mo', String includedSemanticsLabel = 'included', String notIncludedSemanticsLabel = 'not included', String partialSemanticsLabel = 'partially included', String? semanticLabel, bool showEdgeFade = true, Color? edgeFadeColor})
const

Properties

accentColor Color?
Overrides the fallback tier accent when a tier has no BankPlanTier.accentColor. Defaults to the theme primary.
final
columnWidth double?
Width of each tier column. Defaults to 120.
final
edgeFadeColor Color?
The colour the edge fade ramps to. Defaults to the theme surface — the tone a table is normally carded on. Set it to whatever is actually behind the table when that differs, otherwise the fade reads as a coloured bar instead of the content running out.
final
excludedColor Color?
Colour of the not-included cross. Defaults to the theme onSurfaceVariant.
final
excludedIcon IconData?
Glyph for not-included features. Defaults to Icons.close.
final
featureLabelStyle TextStyle?
Merged over the feature-label style (BankTokens.bodySmall in onSurfaceVariant).
final
hashCode int
The hash code for this object.
no setterinherited
headerHeight double?
Height of the tier header block. Defaults to 120.
final
highlightColor Color?
Overrides the emphasis border colour of the highlighted tier. Defaults to the theme primary.
final
highlightedTierId String?
final
includedColor Color?
Colour of the included-feature check. Defaults to BankTokens.success.
final
includedIcon IconData?
Glyph for included features. Defaults to Icons.check.
final
includedSemanticsLabel String
Screen-reader value for included cells. Defaults to 'included'.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelColumnWidth double?
Width of the fixed feature-label column. Defaults to 140.
final
notIncludedSemanticsLabel String
Screen-reader value for not-included cells. Defaults to 'not included'.
final
onSelectTier ValueChanged<BankPlanTier>?
final
partialColor Color?
Colour of the partially-included dash. Defaults to BankTokens.pending.
final
partialIcon IconData?
Glyph for partially-included features. Defaults to Icons.horizontal_rule.
final
partialSemanticsLabel String
Screen-reader value for partial cells. Defaults to 'partially included'.
final
perMonthLabel String
Suffix under each monthly price. Defaults to '/mo'.
final
priceStyle TextStyle?
Merged over the price style (theme numeralSmall in onSurface).
final
rowHeight double?
Height of each feature row. Defaults to 44.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel String?
Overrides the generated table semantics label ('Plan comparison table with <n> tiers').
final
showEdgeFade bool
Whether an edge fade marks the direction the table can still scroll in.
final
tierNameStyle TextStyle?
Merged over the tier-name style (BankTokens.labelLarge in the tier accent).
final
tiers List<BankPlanTier>
final

Methods

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