popUntil method
Pops pages from the current stack until the predicate returns true
.
Implementation
void popUntil(
BuildContext context,
bool Function(RoutebornPage page) predicate,
) {
final navState = context.findAncestorStateOfType<NavigatorState>();
final key = navState?.widget.key ?? rootNavKey;
_rootPageNodesSetter = _handleStackAction(
(currentStack) => currentStack.popUntil(predicate),
key,
);
notifyListeners();
}