canPop property

bool canPop

Whether or not this implicit navigator or any implicit navigators below it can pop.

Implementation

bool get canPop {
  return navigatorTree
      .expand((navigators) => navigators)
      .any((navigator) => navigator.shallowCanPop);
}
void canPop=(bool newValue)

Set whether or not this implicit navigator and all those below it should ignore attempts to pop (including from the system back button).

Set canPop to false if you are taking this navigator off stage and do not want it intercepting calls to pop.

Implementation

set canPop(bool newValue) {
  if (_canPop != newValue) {
    _canPop = newValue;
    _onStackChanged();
  }
}