updateValue method
void
updateValue(
- FieldId fieldId,
- dynamic fieldValue
Implementation
void updateValue(FieldId fieldId, dynamic fieldValue) {
final Json data = <String, dynamic>{
...state.data,
};
final bool isValueEmpty = isEmpty(fieldValue);
if (isValueEmpty) {
data.remove(fieldId);
} else {
data[fieldId] = fieldValue;
}
_updateData(data);
}