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