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