InputTxtField class
A configurable text input field.
This widget wraps TextFormField and provides:
- Validation support
- Obscure text (for passwords)
- Custom capitalization and keyboard type
- Simple outlined style with padding
Useful for login forms, registration, or general user input.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- InputTxtField
Constructors
- InputTxtField({Key? key, required String hintText, required TextEditingController controller, String? validator(String?)?, bool obscureText = false, bool autocorrect = false, TextCapitalization textCapitalization = TextCapitalization.none, TextInputType keyboardType = TextInputType.text})
-
Creates an InputTxtField with optional behaviors like validation,
password protection, autocorrection, and keyboard customization.
const
Properties
- autocorrect → bool
-
Whether to enable the device's autocorrect functionality.
final
- controller → TextEditingController
-
Controller used to read and write the input field's text.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hintText → String
-
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 use for text input.
final
- obscureText → bool
-
Whether the text should be hidden (e.g. for passwords).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- textCapitalization → TextCapitalization
-
How the text input should be capitalized.
final
- validator → String? Function(String?)?
-
Optional validation function returning an error string if invalid.
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