reset method Null safety

void reset()

Resets every FormField that is a descendant of this Form back to its FormField.initialValue.

The Form.onChanged callback will be called.

If the form's Form.autovalidateMode property is AutovalidateMode.always, the fields will all be revalidated after being reset.


void reset() {
  for (final FormFieldState<dynamic> field in _fields) {
  _hasInteractedByUser = false;