menu

  1. [ Flutter ](index.html)
  2. [ widgets.dart ](widgets/widgets-library.html)
  3. FormState class 

FormState

brightness_4  brightness_5

[ description
](https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/widgets/form.dart#L204
"View source code")

#  FormState  class

State associated with a [ Form ](widgets/Form-class.html) widget.

A [ FormState ](widgets/FormState-class.html) object can be used to [ save
](widgets/FormState/save.html) , [ reset ](widgets/FormState/reset.html) , and
[ validate ](widgets/FormState/validate.html) every [ FormField
](widgets/FormField-class.html) that is a descendant of the associated [ Form
](widgets/Form-class.html) .

Typically obtained via [ Form.of ](widgets/Form/of.html) .

Inheritance

    

  * [ Object ](dart-core/Object-class.html)
  * [ State ](widgets/State-class.html) < [ Form ](widgets/Form-class.html) >
  * FormState 

##  Constructors

[ FormState ](widgets/FormState/FormState.html) ()

    

##  Properties

[ context ](widgets/State/context.html) → [ BuildContext
](widgets/BuildContext-class.html)

     The location in the tree where this widget builds. 

no setter  inherited

[ hashCode ](dart-core/Object/hashCode.html) → [ int ](dart-core/int-
class.html)

     The hash code for this object. 

no setter  inherited

[ mounted ](widgets/State/mounted.html) → [ bool ](dart-core/bool-class.html)

     Whether this [ State ](widgets/State-class.html) object is currently in a tree. 

no setter  inherited

[ runtimeType ](dart-core/Object/runtimeType.html) → [ Type ](dart-core/Type-
class.html)

     A representation of the runtime type of the object. 

no setter  inherited

[ widget ](widgets/State/widget.html) → [ Form ](widgets/Form-class.html)

     The current configuration. 

no setter  inherited

##  Methods

[ activate ](widgets/State/activate.html) (  )  → void

     Called when this object is reinserted into the tree after having been removed via [ deactivate ](widgets/State/deactivate.html) . 

inherited

[ build ](widgets/FormState/build.html) (  [ BuildContext
](widgets/BuildContext-class.html) context  )  → [ Widget ](widgets/Widget-
class.html)

     Describes the part of the user interface represented by this widget. 

override

[ deactivate ](widgets/State/deactivate.html) (  )  → void

     Called when this object is removed from the tree. 

inherited

[ debugFillProperties ](widgets/State/debugFillProperties.html) (  [
DiagnosticPropertiesBuilder ](foundation/DiagnosticPropertiesBuilder-
class.html) properties  )  → void

     Add additional properties associated with the node. 

inherited

[ didChangeDependencies ](widgets/State/didChangeDependencies.html) (  )  →
void

     Called when a dependency of this [ State ](widgets/State-class.html) object changes. 

inherited

[ didUpdateWidget ](widgets/State/didUpdateWidget.html) (  covariant  [ Form
](widgets/Form-class.html) oldWidget  )  → void

     Called whenever the widget configuration changes. 

inherited

[ dispose ](widgets/State/dispose.html) (  )  → void

     Called when this object is removed from the tree permanently. 

inherited

[ initState ](widgets/State/initState.html) (  )  → void

     Called when this object is inserted into the tree. 

inherited

[ noSuchMethod ](dart-core/Object/noSuchMethod.html) (  [ Invocation ](dart-
core/Invocation-class.html) invocation  )  → dynamic

     Invoked when a nonexistent method or property is accessed. 

inherited

[ reassemble ](widgets/State/reassemble.html) (  )  → void

     Called whenever the application is reassembled during debugging, for example during hot reload. 

inherited

[ reset ](widgets/FormState/reset.html) (  )  → void

     Resets every [ FormField ](widgets/FormField-class.html) that is a descendant of this [ Form ](widgets/Form-class.html) back to its [ FormField.initialValue ](widgets/FormField/initialValue.html) . 
[ save ](widgets/FormState/save.html) (  )  → void

     Saves every [ FormField ](widg