markAsDisabled method
Disables the control.
This means the control is exempt from validation checks and excluded
from the aggregate value of any parent. Its status is DISABLED
.
If the control has children, all children are also disabled.
When updateParent
is false, mark only this control.
When true or not supplied (the default), marks all direct ancestors.
When emitEvent
is true or not supplied (the default), valueChanges
and statusChanged events are emitted if value or status change.
Otherwise the control update this values but none of this events are
emitted.
Implementation
@override
void markAsDisabled({bool updateParent = true, bool emitEvent = true}) {
_controls.forEach((_, control) {
control.markAsDisabled(updateParent: true, emitEvent: emitEvent);
});
super.markAsDisabled(updateParent: updateParent, emitEvent: emitEvent);
}