canPop method
Returns whether the current route can be popped.
Returns true
if there are at least 2 routes in the stack, meaning the
current route can be popped without removing the last remaining route.
Returns false
if there is only one route left, as the router must
maintain at least one route on the stack.
Implementation
bool canPop() {
return _routeStack.length > 1;
}