BankEmblemStack class

A row of overlapping identities with a +N overflow disc.

The group answers "who is in this?" in one glance and in a bounded width: at most maxVisible emblems are drawn and everyone else is folded into a trailing overflow disc, so a seventh member can never fall off the edge of a card.

Layout is directional, not mirrored geometry: the first identity sits on the leading edge and is painted on top, each later one tucking behind it toward the trailing edge. In RTL that reverses automatically, because every offset is a PositionedDirectional start.

Set overlap to 0 and give spacing a value to get a spaced rail instead of a pile — same overflow behaviour, same ladder.

BankEmblemStack(
  emblems: [for (final m in members) BankEmblemData(initialsFrom: m.name)],
  tier: BankEmblemSize.small,
  maxVisible: 5,
)

A group whose members are purely decorative is exactly as tall as one disc. As soon as anything in it can be tapped — a member's BankEmblemData.onTap or onOverflowTap — every slot grows to BankTokens.minTapTarget per side with the disc centred inside it, the same floor BankEmblem reserves on its own. The discs stay where they were; the group gains the half-difference as padding on each edge.

Inheritance

Constructors

BankEmblemStack({required List<BankEmblemData> emblems, Key? key, BankEmblemSize tier = BankEmblemSize.medium, double? size, int maxVisible = 4, double overlap = defaultOverlap, double spacing = 0, BankEmblemRing? ring, int? overflowCount, String overflowTemplate = '+{n}', Color? overflowTintColor, VoidCallback? onOverflowTap, String? semanticLabel})
Creates a stacked identity group.
const

Properties

emblems List<BankEmblemData>
The identities to draw, in the order they should appear.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxVisible int
Maximum number of identities drawn before the rest fold into the overflow disc.
final
onOverflowTap VoidCallback?
Called when the overflow disc is tapped (typically opens the full list).
final
overflowCount int?
Overrides the number shown in the overflow disc. Defaults to however many emblems did not fit within maxVisible.
final
overflowTemplate String
Template for the overflow label; {n} is substituted.
final
overflowTintColor Color?
Hue the overflow disc is tinted from. Defaults to BankThemeData.onSurfaceVariant — the overflow is a quantity, not an identity, so it stays neutral rather than borrowing a brand hue.
final
overlap double
Fraction of a diameter each emblem is pulled back over the previous one, in the range 0..1. Defaults to defaultOverlap; 0 gives a rail.
final
ring BankEmblemRing?
Ring applied to every emblem that does not carry its own.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel String?
Overrides the merged group semantics. Defaults to the visible identities' labels followed by the overflow label.
final
size double?
Off-ladder diameter for the whole group. Prefer tier.
final
spacing double
Extra gap added between emblems, on top of whatever overlap leaves. Only meaningful when overlap is 0 or small.
final
tier BankEmblemSize
Rung every emblem in the group is drawn at. Ignored when size is set.
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

Constants

defaultOverlap → const double
Fraction of each disc hidden by the one in front of it.