AbstractControl<T> class abstract

Implementers
Annotations
  • @optionalTypeArgs

Constructors

AbstractControl(ValidatorFn? validator, {dynamic value})

Properties

dirty → bool
no setter
disabled → bool
no setter
disabledChanges → Stream<bool>
no setter
enabled → bool
no setter
errors → Map<String, dynamic>?
Returns the errors of this control.
no setter
hashCode → int
The hash code for this object.
no setterinherited
invalid → bool
no setter
pending → bool
no setter
pristine → bool
no setter
root → AbstractControl
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
status → String?
The validation status of the control.
no setter
statusChanges → Stream<String>
no setter
touched → bool
no setter
untouched → bool
no setter
valid → bool
no setter
validator ↔ ValidatorFn?
getter/setter pair
value → T?
no setter
valueChanges → Stream<T?>
no setter

Methods

find(String? path) → AbstractControl?
Walks the path supplied to find matching control.
findPath(List<String?>? path) → AbstractControl?
Walks the path to find the matching control.
getError(String errorCode, [List<String>? path]) → dynamic
hasError(String errorCode, [List<String>? path]) → bool
markAsDirty({bool? onlySelf, bool emitEvent = true}) → void
Mark the control as dirty.
markAsDisabled({bool updateParent = true, bool emitEvent = true}) → void
Disables the control. This means the control will be exempt from validation checks and excluded from the aggregate value of any parent. Its status is DISABLED.
markAsEnabled({bool updateParent = true, bool emitEvent = true}) → void
Enables the control. This means the control will be included in validation checks and the aggregate value of its parent. Its status is re-calculated based on its value and its validators.
markAsPending({bool onlySelf = false}) → void
markAsPristine({bool updateParent = true}) → void
Marks the control as pristine.
markAsTouched({bool updateParent = true}) → void
Marks the control as touched.
markAsUntouched({bool updateParent = true}) → void
Marks the control as untouched.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onUpdate() → void
Callback when control is asked to update its value.
reset({T? value, bool? isDisabled, bool? updateParent, bool? emitEvent}) → void
Resets the form control.
setErrors(Map<String, dynamic> errors, {bool emitEvent = true}) → void
Sets errors on a control.
setParent(AbstractControl parent) → void
toString() → String
A string representation of this object.
inherited
updateValue(T? value, {bool? onlySelf, bool? emitEvent, bool? emitModelToViewChange, String? rawValue}) → void
Set the value of the AbstractControl to value.
updateValueAndValidity({bool? onlySelf, bool? emitEvent}) → void

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

DISABLED → const String
Indicates that a FormControl is disabled, i.e. that the control is exempt from ancestor calculations of validity or value.
INVALID → const String
Indicates that a Control is invalid, i.e. that an error exists in the input value.
PENDING → const String
Indicates that a Control is pending, i.e. that async validation is occurring and errors are not yet available for the input value.
VALID → const String
Indicates that a Control is valid, i.e. that no errors exist in the input value.