onPress

this

validate

In Flutter, use the TextEditingController
class to manage a TextField widget.
Whenever the text field is modified,
the controller notifies its listeners.

Listeners read the text and selection properties to
learn what the user typed into the field.
You can access the text in TextField
by the text property of the controller.

In this example, when a user clicks on the submit button an alert dialog
displays the current text entered in the text field.
This is achieved using an AlertDialog
widget that displays the alert message, and the text from
the TextField is accessed by the text property of the
TextEditingController.

How do I use Form widgets?

Form widget where

TextFormField widgets along with the submit
button are passed as children.
The

onSaved that takes a callback and executes
when the form is saved. A