canPop static method
Returns whether the navigation stack can be popped.
This is equivalent to calling NavPages.of(context).canPop(). Returns true if there are pages in the stack that can be popped.
Example:
if (NavPages.canPop(context)) {
NavPages.pop(context);
}
Implementation
static bool canPop(BuildContext context) {
return of(context).canPop();
}