Note:
  This example does not validate the accuracy of the user input.
  That is something you can add later using form validation, if you like.

Add a method to update _formProgress.
In the _SignUpFormState class, add a new method called
_updateFormProgress():

    
void _updateFormProgress() {
  var progress = 0.0;
  final controllers = [
    _firstNameTextController,
    _lastNameTextController,
    _usernameTextController
  ];

  for (final controller in controllers) {
    if (controller.value.text.isNotEmpty) {
      progress += 1 / controllers.length;
    }
  }

  setState(() {
    _formProgress = progress;
  });
}


    This method updates the _formProgress field based on the
the number of non-empty text fields.