September 2019
Beginner
512 pages
12h 52m
English
The Form widget is used with the companion of a key of the FormState type, that contains helpers to manage all of the children of its FormField instances:
final _key = GlobalKey<FormFieldState<String>>();...Form( key: _key, child: Column( children: <Widget>[ TextFormField(), TextFormField(), ], ),);
Then, we can use the key to retrieve the Form associated state and call its validation with _key.currentState.validate(). Now, let's have a look at the second option.
Read now
Unlock full access