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