canPop function

bool canPop({
  1. BuildContext? context,
})

Implementation

bool canPop({BuildContext? context}) {
  if (context == null && (!state.isContextLoaded || !state.appContext.mounted)) {
    assert(false,
    "App Context was not loaded or not mounted");

    return false;
  }
  if (context != null && !context.mounted) {
    assert(false,
    "Provided Context was not loaded or not mounted");

    return false;
  }
  context = context?? state.appContext;

  return Navigator.canPop(context);
}