onFieldValueChanged<T> method
void
onFieldValueChanged<
T>( - TKey loKey,
- T? value
)
Implementation
@internal
void onFieldValueChanged<T>(TKey loKey, T? value) {
final field = fields.get<T>(loKey);
field.value = value;
field.touched = true;
final fieldError = LoFieldBaseValidator.run(field.validators, value);
final formErrors = LoFormBaseValidator.run<TKey>(
validators,
fields.getValues(),
);
final formError = formErrors.remove(loKey);
final errors = {
...formErrors,
loKey: fieldError ?? formError,
};
setErrors(errors);
notifyListeners();
}