save method
Implementation
Future<void> save(EditorBaseApplyChanges event) async {
if (state is EditorBaseInitialised) {
var theState = state as EditorBaseInitialised;
var newModel = theState.model;
if (await repository.get(newModel.documentID) == null) {
await repository.add(newModel);
} else {
await repository.update(newModel);
}
feedback(true, newModel);
}
}