updateValue method

void updateValue(
  1. FieldId fieldId,
  2. 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);
}