InputForm class

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

Remove attribute readOnly in TextField and TextFormField https://github.com/flutter/flutter/issues/45604

Integrate enable/disable into FormState and FormField https://github.com/flutter/flutter/issues/45606

Add handling of maps in Form and FormField => CLOSED (see #46073) https://github.com/flutter/flutter/issues/45609

Provide input widgets to easily build data manipulation forms https://github.com/flutter/flutter/issues/46073

Inheritance

Constructors

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. [...]

Properties

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.
final
autovalidate bool
Automatically validates changed values in input fields. Default is false. This value can be overwritten by each field.
final
child Widget
The child is normally a layout widget which contains the input fields.
final
decoration InputDecoration
Decoration used by the input fields.
final
enabled bool
Enables or disables user input on all fields. Default is true. This value can be overwritten by each field.
final
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.
final
onChanged ValueChanged
Called when one of the form fields changes. [...]
final
onSaved ValueSetter
Called by InputForm.save()
final
onWillPop WillPopCallback
Enables the form to veto attempts by the user to dismiss the ModalRoute that contains the form. [...]
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree. [...]
inherited
createState() InputFormState
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. [...]
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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
Returns a string representation of this object.
inherited
toStringDeep({String prefixLineOne: '', String prefixOtherLines, DiagnosticLevel minLevel: DiagnosticLevel.debug}) 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. [...]
@nonVirtual, inherited

Static Methods

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