abortEditing method

Future<void> abortEditing(
  1. BuildContext context
)

Implementation

Future<void> abortEditing(BuildContext context) async {
  FocusNode().requestFocus();

  onAbort?.call(context);

  if (lockService != null) {
    lockService!.removeLock(
        databaseCollection.collectionName, updateItemFrame.editableItem.id);
  }
  LockNavigatorService.instance.unlockTopStack();

  if (updateItemFrame.editableItem.id == null) {
    Navigator.of(context).pop();
  } else {
    updateItemFrame.setEditable(false);
    updateNotifier.update();
  }
}