clear method
Marks all records as deleted.
Note: by default this doesn't actually delete the records since the deletion needs to be propagated when merging with other CRDTs.
Set purge
to true to clear the records. Useful for testing or to reset a store.
Implementation
void clear({bool purge = false}) {
if (purge) {
this.purge();
} else {
putAll(map.map((key, _) => MapEntry(key, null)));
}
}