reset method

void reset()

Resets the state of all fields in this controller, loading the initial values.

This method calls the FieldBindingController.reset method on all fields, the exact behavior of this method is dependent on the implementation of the FieldBindingController and may be different to normal FieldBindingController.setValue calls.

Implementation

void reset() {
  for (var i = 0; i < fields.length; i++) {
    final field = fields[i];
    field.reset();
    _fieldValueChangeController.add((field.fieldName, field.getValue()));
    field.handleErrors(AnnotationResult.empty());
  }
  _errorBuffer.clearAll();
  _errorBuffer.recalculateFieldErrors();
}