put method
FutureOr<ISunnyContact?>
put(
- MKey id,
- void modification(
- ISunnyContact _in
- bool ignoreNotLoaded = false,
inherited
Updates the internal map without triggering any persistence. It's possible that other entities that are observing this store will update.
Implementation
FutureOr<V?> put(MKey id, void modification(V _in),
{bool ignoreNotLoaded = false}) {
final record = _internalGet(id);
final modify = record.modify((value) {
final cloned = repository.clone(value);
modification(cloned);
return cloned;
}, ignoreNotLoaded: ignoreNotLoaded);
applyChanges((_) => _.change(id, record));
return modify;
}