popUntil method

void popUntil(
  1. bool predicate(
    1. PageWrapper pageWrapper
    )
)

Pops all the previous routes until the predicate returns true.

Implementation

void popUntil(bool Function(PageWrapper pageWrapper) predicate) async {
  for (var index = _pageStack.length - 1;
      index > 0 && !predicate(_pageStack[index]);
      index--) {
    _navigatorState.pop();
  }
}