setValue method Null safety
- dynamic value,
- {Options? options}
can be used to set the value
property
Implementation
void setValue(dynamic value, {Options? options}) async {
void performUpdate() {
final prev = this.value;
this.value = value;
this._applyOptions(options, 'value', prev, this.value);
}
if (this.beforeValueChange != null) {
try {
await beforeValueChange!(value);
performUpdate();
} catch (e) {
print(e);
}
} else {
performUpdate();
}
}