popUntil<E> method
Keep pop until the predicate
condition is true
.
The result of pop is returned by result
.
predicate
の条件がtrue
になるまでpopし続けます。
popした結果をresult
で返します。
Implementation
void popUntil<E>(bool Function(RouteQuery query) predicate, [E? result]) {
var index = _pageStack.length - 1;
while (index >= 0 && !predicate(_pageStack[index].query)) {
final container = _pageStack.removeAt(index);
container.completer.complete(result);
index -= 1;
}
_routerDelegate.notifyListeners();
}