September 2019
Beginner
512 pages
12h 52m
English
Validating user input is one of the main functions of the Form widget. In order to make the data input entered by the user consistent, it is fundamental to check it, as the user probably does not know all the allowed values.
The Form widget, combined with FormField instances, helps the developer to show an appropriate error message if some input values need to be corrected before saving the form data through its save() function.
We already have seen, in the previous Form examples, how to validate the Form field values:
TextFormField( validator: (String value) { return value.isEmpty ? "The value cannot be ...Read now
Unlock full access