AbstractControl<T> constructor
AbstractControl<T> ({
- List<
Validator> validators = const [], - List<
AsyncValidator> asyncValidators = const [], - @Deprecated("Use [Validators.debounced] to specify a debounce time for individual asynchronous validators.") int asyncValidatorsDebounceTime = 250,
- bool disabled = false,
- 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);
}