OudsTextInput class

OudsTextInput is a customizable text input field that allows users to enter, edit, or read text.

This version supports fully configurable styling, including prefix and suffix icons, error states, loading states, and helper or error messages.

Accessibility is supported: you can provide a hint for screen readers to inform the user of possible actions, for example: "Placeholder".

Parameters:

  • controller: The text controller linked to this input.
  • focusNode: The focus node to manage focus state.
  • enabled: Whether the input is enabled.
  • readOnly: Whether the input is read-only.
  • keyboardType: The type of keyboard to display.
  • decoration: An OudsInputDecoration object to configure label,

Simple example:

OudsTextField(
  controller: myController,
  decoration: OudsInputDecoration(
    labelText: 'label',
    hintText: 'Placeholder', // Accessibility hint
    prefixIcon: 'assets/ic_heart.svg',
  ),
);
Inheritance
Implementers

Constructors

OudsTextInput.new({Key? key, TextEditingController? controller, FocusNode? focusNode, bool? enabled = true, bool? readOnly = false, TextInputType? keyboardType, required OudsInputDecoration decoration})

Properties

controller TextEditingController?
final
decoration OudsInputDecoration
final
enabled bool?
final
focusNode FocusNode?
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardType TextInputType?
final
readOnly bool?
final
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<OudsTextInput>
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

Static Methods

buildIcon(BuildContext context, String assetName, OudsTextInputControlState controlTextInputState, bool isError) Widget