FormState class

The mutable state of a Form.

Inheritance

Constructors

FormState()

Properties

activeFieldIndex int
The index of the currently active form field.
getter/setter pair
context BuildContext
The location in the tree where this widget builds.
no setterinherited
fields Iterable<FormFieldState>
Retrieves the list of currently registered form field states.
no setter
hashCode int
The hash code for this object.
no setterinherited
mounted bool
Whether this State object is currently in a tree.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
widget Form
The current configuration.
no setterinherited

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
didChangeDependencies() → void
Called when a dependency of this State object changes.
inherited
dispose() → void
Called when this object is removed from the tree permanently.
override
handleKeyEvent(KeyEvent event) → void
Routes a key event to the focused field, handling tab navigation.
initState() → void
Called when this object is inserted into the tree.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerField(FormFieldState field) → void
Registers a FormFieldState dynamically with this form.
reset() → void
Resets all fields to their initial values.
setState(VoidCallback fn) → void
Notifies the framework that the internal state of this object has changed.
inherited
toString() String
A string representation of this object.
inherited
unregisterField(FormFieldState field) → void
Unregisters a FormFieldState from this form.
validate() bool
Validates all fields registered in this form.

Operators

operator ==(Object other) bool
The equality operator.
inherited