setValue method
Sets the value leaf at path to v, converting at the store boundary.
null clears. For typed scalars v must be the native type (or a
string, taken verbatim); for enum leaves v must be one of the field's
constant names. Throws ArgumentError for a non-leaf path, a wrong
value type, or an out-of-domain enum name.
Implementation
void setValue(String path, Object? v) {
final r = _valueLeaf(path);
document.setContent(path, _format(v, r.kind, r.field, path));
}