BankPinDots class
Displays filled/empty dot indicators for a PIN entry sequence.
Works alongside BankPinKeypad or any other PIN input mechanism. The filled count drives the visual state; the host app is responsible for tracking the actual PIN digits.
Unfilled positions render as a light outline ring; entered digits render as solid primary dots with a subtle scale pop, so progress reads at a glance.
When error flips from false to true, the dot row plays a short
horizontal shake animation and the dots recolour with the danger role to
signal an incorrect PIN.
BankPinDots(
length: 6,
filled: _pin.length,
error: _showError,
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- BankPinDots
Constructors
Properties
- animationCurve → Curve?
-
Overrides the dot fill transition curve. Defaults to
BankTokens.curveStandard.
final
- animationDuration → Duration?
-
Overrides the dot fill transition duration. Defaults to
BankTokens.durationFast.
final
- dotSize → double
-
Diameter of each filled dot in logical pixels. Defaults to
12. Unfilled rings render 2 px smaller so entered digits carry more weight.final - emptyColor → Color?
-
Override colour for empty dot rings. Defaults to
BankThemeData.outline at 50 % opacity. The error state takes
precedence.
final
- error → bool
-
When flipped to
true, the dot row plays a horizontal shake animation and the dots recolour with the theme's danger role (BankThemeData.negativeBalance) to indicate an incorrect PIN entry.final - filled → int
-
Number of digits entered so far. Clamped internally to
0, length.final - filledColor → Color?
-
Override colour for filled dots. Defaults to BankThemeData.primary.
The error state takes precedence.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- length → int
-
Total expected PIN length (e.g. 6).
final
- obscure → bool
-
When
true, dots are drawn as solid circles; whenfalse, this field is reserved for future use: in practice dots are always shown obscured.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticLabel → String?
-
Overrides the computed semantics label. Defaults to
'N of M digits entered'.final - spacing → double?
-
Overrides the gap between dots. Defaults to BankTokens.space2.
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