AuiTextField class

A styled text input widget that supports outlined, filled, and underlined variants, with optional label, hint, error, helper, character counter, prefix/suffix icons, obscure-text toggle, and multiline support.

Border radius reads from AuraUITheme.containerRadius → fallback 8.0.

// Outlined (default)
AuiTextField(label: 'Email', hint: 'you@example.com')

// Filled
AuiTextField.filled(label: 'Search')

// Underlined
AuiTextField.underlined(label: 'Name')
Inheritance

Constructors

AuiTextField({Key? key, TextEditingController? controller, String? label, String? hint, String? error, String? helper, IconData? prefixIcon, IconData? suffixIcon, VoidCallback? onSuffixTap, int? maxLength, bool obscureText = false, bool enabled = true, ValueChanged<String>? onChanged, ValueChanged<String>? onSubmitted, TextInputType? keyboardType, int maxLines = 1, bool autofocus = false})
Creates an outlined AuiTextField (default variant).
const
AuiTextField.filled({Key? key, TextEditingController? controller, String? label, String? hint, String? error, String? helper, IconData? prefixIcon, IconData? suffixIcon, VoidCallback? onSuffixTap, int? maxLength, bool obscureText = false, bool enabled = true, ValueChanged<String>? onChanged, ValueChanged<String>? onSubmitted, TextInputType? keyboardType, int maxLines = 1, bool autofocus = false})
Creates a filled AuiTextField.
const
AuiTextField.underlined({Key? key, TextEditingController? controller, String? label, String? hint, String? error, String? helper, IconData? prefixIcon, IconData? suffixIcon, VoidCallback? onSuffixTap, int? maxLength, bool obscureText = false, bool enabled = true, ValueChanged<String>? onChanged, ValueChanged<String>? onSubmitted, TextInputType? keyboardType, int maxLines = 1, bool autofocus = false})
Creates an underlined AuiTextField (no surrounding border box).
const

Properties

autofocus bool
Whether the field should be focused automatically on mount. Defaults to false.
final
controller TextEditingController?
Optional TextEditingController to control the field's text.
final
enabled bool
Whether the field is interactive. Defaults to true.
final
error String?
When non-null, renders the string as an error message below the field and highlights borders in the error color.
final
hashCode int
The hash code for this object.
no setterinherited
helper String?
Optional helper text displayed below the field when there is no error.
final
hint String?
Optional hint text displayed when the field is empty.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardType TextInputType?
The type of keyboard to display for this field.
final
label String?
Optional label text displayed above/inside the field.
final
maxLength int?
When set, displays a character counter below the field in the form "<current> / <maxLength>".
final
maxLines int
Maximum number of lines for the field. Defaults to 1.
final
obscureText bool
Whether to obscure the input (e.g. for password fields).
final
onChanged ValueChanged<String>?
Called whenever the field's text changes.
final
onSubmitted ValueChanged<String>?
Called when the user submits the field (e.g. presses the keyboard action button).
final
onSuffixTap VoidCallback?
Callback invoked when the suffix icon is tapped.
final
prefixIcon IconData?
Optional icon shown at the leading edge of the field.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
suffixIcon IconData?
Optional icon shown at the trailing edge of the field.
final

Methods

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