markAllAsTouched method Null safety

void markAllAsTouched(
  1. {bool updateParent = true,
  2. bool emitEvent = true}

Marks the control and all its descendant controls as touched.

When updateParent is false, mark only this control and descendants. When true or not supplied, marks also all direct ancestors. Default is true.

When emitEvent is true or not supplied (the default), a notification event is emitted.


void markAllAsTouched({bool updateParent = true, bool emitEvent = true}) {
  markAsTouched(updateParent: updateParent, emitEvent: emitEvent);
  forEachChild((control) => control.markAllAsTouched(updateParent: false));