updateValue method
void
updateValue(})
override
Set the value of the control to value.
If onlySelf is true, this change will only affect the validation of
this Control and not its parent component. This defaults to false.
If emitEvent is true, this change will cause a valueChanges event on
the Control to be emitted. This defaults to true.
If emitModelToViewChange is true, the view will be notified about the
new value via an onChange event. This is the default behavior if
emitModelToViewChange is not specified.
Implementation
@override
void updateValue(T? value,
{bool? onlySelf,
bool? emitEvent,
bool? emitModelToViewChange,
String? rawValue}) {
emitModelToViewChange ??= true;
_value = value;
_rawValue = rawValue;
if (_onChange != null && emitModelToViewChange) _onChange!(_value);
updateValueAndValidity(onlySelf: onlySelf, emitEvent: emitEvent);
}