Since focus nodes are long-lived objects, manage the lifecycle
using a State object. Use the following instructions to create
a FocusNode instance inside the initState() method of a
State class, and clean it up in the dispose() method:

2. Pass the FocusNode to a TextField

Now that you have a FocusNode,
pass it to a specific TextField in the build() method.

3. Give focus to the TextField when a button is tapped

Finally, focus the text field when the user taps a floating
action button. Use the requestFocus() method to perform
this task.

Interactive example

Retrieve the value of a text field

Add Material touch ripples