backUntil method

  1. @override
void backUntil(
  1. bool predicate(
    1. GetPage
    )
)
override

Navigates back until a certain condition is met.

Implementation

@override
void backUntil(bool Function(GetPage) predicate) {
  while (_activePages.length <= 1 && !predicate(_activePages.last.route!)) {
    _popWithResult();
  }

  notifyListeners();
}