Important: Call dispose of the TextEditingController when
  you’ve finished using it. This ensures that you discard any resources
  used by the object.

2. Supply the TextEditingController to a TextField

Now that you have a TextEditingController, wire it up
to a text field using the controller property:

3. Display the current value of the text field

After supplying the TextEditingController to the text field,
begin reading values. Use the text()
method provided by the TextEditingController to retrieve the
String that the user has entered into the text field.

The following code displays an alert dialog with the current
value of the text field when the user taps a floating action button.

Interactive example

Create an expandable FAB

Focus and text fields