canPop method
Checks if route can be popped
The route cant be popped if it is root route in navigator or if latest route is not dismissable
Implementation
bool canPop({bool global = true}) {
if (global) {
return navigationStack.globalNavigationStack.stack.length > 1 &&
latestGlobalRoute().settings.dismissable;
} else {
return navigationStack.tabNavigationStack.stack[currentTab]!.length > 1 &&
latestTabRoute().settings.dismissable;
}
}