canPop method

bool canPop()

A method that returns true if the Navigator can pop the current route.

Implementation

bool canPop() {
  final NavigatorState? navigator = Navigator.maybeOf(this);
  return navigator != null && navigator.canPop();
}