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