clearValidators method

void clearValidators({
  1. bool autoValidate = false,
  2. bool updateParent = true,
  3. bool emitEvent = true,
})

Empties out the sync validator list.

Implementation

void clearValidators({
  bool autoValidate = false,
  bool updateParent = true,
  bool emitEvent = true,
}) {
  _validators.clear();

  if (autoValidate) {
    updateValueAndValidity(updateParent: updateParent, emitEvent: emitEvent);
  }
}