set method

void set(
  1. String? path,
  2. dynamic value
)

Updates the content at path with value

When path is null, will set the root snapshot

To use this method, the ModifiableSnapshotView.fromJson constructor should have been used.

Implementation

void set(String? path, dynamic value) {
  if (path == null) {
    _snapshots.add(_snapshot.set(value));
  } else {
    _snapshots.add(_snapshot.setPath(path, value));
  }
}