FormField<T> class
A single form field that manages its own value, validation, and saving.
Supply a builder callback that returns the visual widget tree, using FormFieldState to access the current value and error state.
- Inheritance
-
- Object
- Widget
- StatefulWidget
- FormField
Constructors
Properties
-
builder
→ Widget Function(FormFieldState<
T> ) -
Builds the visual representation using the current field state.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialValue → T
-
The starting value of the field.
final
- key → Key?
-
Controls how one widget replaces another in the tree.
finalinherited
- onSaved → void Function(T)?
-
Called when the parent Form is saved.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- validator → String? Function(T?)?
-
An optional validation function that returns an error string or
null.final
Methods
-
createElement(
) → StatefulElement -
Creates the Element for this widget.
inherited
-
createState(
) → State< FormField< T> > -
Creates the mutable state for this widget.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited