AbstractControl<T> constructor Null safety

AbstractControl<T>(
  1. {List<ValidatorFunction> validators = const [],
  2. List<AsyncValidatorFunction> asyncValidators = const [],
  3. int asyncValidatorsDebounceTime = 250,
  4. bool disabled = false,
  5. bool touched = false}
)

Constructor of the AbstractControl.

Implementation

AbstractControl({
  List<ValidatorFunction> validators = const [],
  List<AsyncValidatorFunction> asyncValidators = const [],
  int asyncValidatorsDebounceTime = 250,
  bool disabled = false,
  bool touched = false,
})  : assert(asyncValidatorsDebounceTime >= 0),
      _asyncValidatorsDebounceTime = asyncValidatorsDebounceTime,
      _touched = touched,
      _status = disabled ? ControlStatus.disabled : ControlStatus.valid {
  setValidators(validators);
  setAsyncValidators(asyncValidators);
}