AbstractControl<T> constructor

AbstractControl<T>({
  1. List<Validator> validators = const [],
  2. List<AsyncValidator> asyncValidators = const [],
  3. @Deprecated("Use [Validators.debounced] to specify a debounce time for individual asynchronous validators.") int asyncValidatorsDebounceTime = 250,
  4. bool disabled = false,
  5. bool touched = false,
})

Constructor of the AbstractControl.

Implementation

AbstractControl({
  List<Validator<dynamic>> validators = const [],
  List<AsyncValidator<dynamic>> asyncValidators = const [],
  @Deprecated(
    "Use [Validators.debounced] to specify a debounce time for individual asynchronous validators.",
  )
  /// **DEPRECATED**: Use [Validators.debounced] to specify a debounce time for
  /// individual asynchronous validators. This property will be removed in a
  /// future major version.
  int asyncValidatorsDebounceTime = 250,
  bool disabled = false,
  bool touched = false,
}) : assert(asyncValidatorsDebounceTime >= 0),
     _asyncValidatorsDebounceTime = asyncValidatorsDebounceTime,
     _touched = touched,
     _initialDisabled = disabled,
     _status = disabled ? ControlStatus.disabled : ControlStatus.valid {
  setValidators(validators);
  setAsyncValidators(asyncValidators);
}