save method
Adds or updates the model
at a given key
in the Source.
Implementation
@override
Future<Change<Record>?> save(String key, Record record) async {
var existing = map[key];
if (existing == record) {
return null;
}
map[key] = record;
if (existing == null) {
return Added(key, record);
}
return Updated(key, record);
}