LionInput class

A customizable text input field inspired by Lion Web Components. Provides accessibility, theming, and configurable styles for developers. TODO: Add support for suffix icons (e.g., clear or visibility toggle for passwords) TODO: Implement dynamic styling based on focus/validation states TODO: Add a loading indicator (e.g., for async validation) TODO: Allow multiline input for text areas

Inheritance

Constructors

LionInput({Key? key, required String label, required String value, required dynamic onChanged(String), bool disabled = false, String? validator(String?)?, String? placeholder, int? maxLength, bool obscureText = false, IconData? prefixIcon, String? semanticLabel})
const

Properties

disabled bool
Whether the input field is disabled.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label String
The label displayed above the input field.
final
maxLength int?
Maximum number of characters allowed.
final
obscureText bool
Controls if the input is obscured (for passwords).
final
onChanged → dynamic Function(String)
Callback function triggered when the input value changes.
final
placeholder String?
Placeholder text for the input field.
final
prefixIcon IconData?
Icon displayed inside the input field (prefix icon).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel String?
Semantic label for screen readers (accessibility support).
final
validator String? Function(String?)?
Validator function for form validation.
final
value String
The initial value of the input field.
final

Methods

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