Forms and user input
Read input, validate a form and handle interaction with clear feedback.
This chapter covers forms and user input through specific problems and worked examples. Read the lesson descriptions before choosing a starting point. Complete runnable examples are labelled; project configuration and code fragments explain where they belong.
Your lessons
One clear step at a time- 01Flutter TextField and TextEditingController ownershipRead a text field, choose between onChanged and a controller, and dispose resources in the widget that creates them.2 min
- 02Flutter form validation with Form and TextFormFieldBuild a complete validated form, display actionable errors and separate client validation from server acceptance.3 min
- 03Flutter gestures, selection and accessible controlsPrefer semantic controls for ordinary actions, use GestureDetector for custom interaction and keep hit targets usable.2 min