OudsDigitInput class

A purely visual widget that renders a single digit cell of a PIN code input.

Keyboard input is handled entirely by the parent OudsPinCodeInput via a single hidden TextField; displayValue is simply passed down for rendering.

Visual states

Condition Content shown
Not focused, empty Hint placeholder
Not focused, filled Value ( when hiddenPassword is true)
Focused, empty Blinking cursor
Focused, filled — normal mode Blinking cursor only
Focused, filled — accessibility mode Value + blinking cursor

The last row applies when isAccessibilityActive is true, giving assistive-technology users a clear indicator that the cell is selected even after it has been filled.

Example

// Typically created by OudsPinCodeInput — shown here for illustration.
OudsDigitInput(
  index: 0,
  isFocused: true,
  displayValue: '3',
  isAccessibilityActive: false,
  digitInputDecoration: OudsDigitInputDecoration(
    hintText: '-',
    hiddenPassword: true,
  ),
)

Parameters:

  • index: Zero-based position of this cell in the PIN sequence.
  • isError: When true, the cell adopts the error visual style.
  • isFocused: Whether this cell is the currently active position.
  • displayValue: Character to display; empty string when the cell is empty.
  • digitInputDecoration: Decoration options (hint, masking, style, …).
Inheritance

Constructors

OudsDigitInput({Key? key, required int index, bool isError = false, OudsDigitInputDecoration? digitInputDecoration, bool isFocused = false, String displayValue = ''})
const

Properties

digitInputDecoration OudsDigitInputDecoration?
final
displayValue String
final
hashCode int
The hash code for this object.
no setterinherited
index int
final
isError bool
final
isFocused bool
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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