InputForm class

                • Regularly check this issues in GitHub - - - - - - -

Remove attribute readOnly in TextField and TextFormField

Integrate enable/disable into FormState and FormField

Add handling of maps in Form and FormField => CLOSED (see #46073)

Provide input widgets to easily build data manipulation forms



InputForm({Key key, bool autosave = true, bool autovalidate = false, @required Widget child, InputDecoration decoration, bool enabled = true, Map<String, dynamic> map, ValueChanged onChanged, ValueSetter onSaved, WillPopCallback onWillPop})
A container to group input widgets (fields) for data manipulation. It provides parameters which are used by all fields and methods which invoke the corresponding method in all fields. It can provide an InputDecoration which is used by all fields. [...]


autosave bool
Automatically saves changed values in fields. Also invokes forms method onSaved. Default is true. This value can be overwritten by each field. If autovalidate is true then a changed value will only be saved if validation succeeds.
autovalidate bool
Automatically validates changed values in input fields. Default is false. This value can be overwritten by each field.
child Widget
The child is normally a layout widget which contains the input fields.
decoration InputDecoration
Decoration used by the input fields.
enabled bool
Enables or disables user input for all fields. Default is true = enabled. To change this value call enable() on the InputFormState. enabled can be set individually by each field.
hashCode int
The hash code for this object. [...]
@nonVirtual, read-only, inherited
key Key
Controls how one widget replaces another widget in the tree. [...]
final, inherited
map Map<String, dynamic>
All descendant input fields will retain their initial value from this map and will update changes into it if they have parameter path set.
onChanged ValueChanged
Called when one of the form fields changes. [...]
onSaved ValueSetter
Called by
onWillPop WillPopCallback
Enables the form to veto attempts by the user to dismiss the ModalRoute that contains the form. [...]
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree. [...]
createState() InputFormState
Creates the mutable state for this widget at a given location in the tree. [...]
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children. [...]
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toDiagnosticsNode({String name, DiagnosticsTreeStyle style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep. [...]
toString({DiagnosticLevel minLevel =}) String
A string representation of this object. [...]
toStringDeep({String prefixLineOne = '', String prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants. [...]
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object. [...]
toStringShort() String
A short, textual description of this widget.


operator ==(Object other) bool
The equality operator. [...]
@nonVirtual, inherited

Static Methods

of(BuildContext context) InputFormState
Returns the closest InputFormState which encloses the given context. [...]