void
updateValueAndValidity({bool onlySelf, bool emitEvent })
Source
void updateValueAndValidity({bool onlySelf, bool emitEvent}) {
onlySelf = onlySelf == true;
emitEvent = emitEvent ?? true;
this._updateValue();
this._errors = this._runValidator();
this._status = this._calculateStatus();
if (this._status == VALID || this._status == PENDING) {
this._runAsyncValidator(emitEvent);
}
if (emitEvent) {
this._valueChanges.add(this._value);
this._statusChanges.add(this._status);
}
if (_parent != null && !onlySelf) {
this
._parent
.updateValueAndValidity(onlySelf: onlySelf, emitEvent: emitEvent);
}
}