canPop method

bool canPop ()

Whether the navigator can be popped.

The initial route cannot be popped off the navigator, which implies that this function returns true only if popping the navigator would not remove the initial route.

If there is no Navigator in scope, returns false.

See also:

Implementation

bool canPop() {
  assert(_history.isNotEmpty);
  return _history.length > 1 || _history[0].willHandlePopInternally;
}