set method

EditBuffer set(
  1. String path,
  2. Object? value
)

Implementation

EditBuffer set(String path, Object? value) {
  final next = Map<String, Object?>.from(edits);
  if (original[path] == value) {
    next.remove(path);
  } else {
    next[path] = value;
  }
  return EditBuffer(
    original: original,
    edits: next,
    isSaving: isSaving,
    error: error,
  );
}