writePath method
void
writePath(
- String? resolverPath,
- String path,
- dynamic value,
- bool encrypted,
)
Implementation
void writePath(
String? resolverPath,
String path,
dynamic value,
bool encrypted,
) async {
resolverPath ??= '';
final store = encrypted ? _encryptedStore : _plaintextStore;
final otherStore = encrypted ? _plaintextStore : _encryptedStore;
// If the document was previously not encrypted and now is or vice-versa, then it should be removed
// from the other store.
otherStore._deletePath(resolverPath, path);
store.isDirty = true;
final valueStore = store._store.get(resolverPath) ??
store._store.write(resolverPath, ValueStore());
valueStore.write(path, value);
}