2. Add a TextFormField with validation logic

Although the Form is in place,
it doesn’t have a way for users to enter text.
That’s the job of a TextFormField.
The TextFormField widget renders a material design text field
and can display validation errors when they occur.

Validate the input by providing a validator() function to the
TextFormField. If the user’s input isn’t valid,
the validator function returns a String containing
an error message.
If there are no errors, the validator must return null.

For this example, create a validator that ensures the
TextFormField isn’t empty. If it is empty,
return a friendly error message.

3. Create a button to validate and submit the form

Now that you have a form with a text field,
provide a button that the user can tap to submit the information.