popUntil method

  1. @override
void popUntil(
  1. bool predicate(
    1. DartBoardPath path
    )
)
override

Pop routers until the predicate clears

Implementation

@override
void popUntil(bool Function(DartBoardPath path) predicate) {
  for (var i = navStack.length - 1; i >= 0; i--) {
    if (predicate(navStack[i])) break;
    navStack.removeAt(i);
  }
  notifyListeners();
}