markAsEnabled method

  1. @override
void markAsEnabled({
  1. bool updateParent = true,
  2. bool emitEvent = true,
})
override

Enables the control. This means the control is included in validation checks and the aggregate value of its parent. Its status recalculates based on its value and its validators.

When updateParent is true or not supplied (the default) each change affects this control and its parent, otherwise only affects to this control.

When emitEvent is true or not supplied (the default), both the statusChanges and valueChanges emit events with the latest status and value when the control is reset. When false, no events are emitted.

Implementation

@override
void markAsEnabled({bool updateParent = true, bool emitEvent = true}) {
  forEachChild((control) {
    control.markAsEnabled(updateParent: true, emitEvent: emitEvent);
  });
  super.markAsEnabled(updateParent: updateParent, emitEvent: emitEvent);
}