offUntil<T> method

Future<T?> offUntil<T>(
  1. Widget page(),
  2. bool predicate(
    1. GetPage
    ), [
  3. Object? arguments,
  4. String? id,
])

Navigates off until a page that satisfies the given predicate is found.

This method searches for a page in the navigation stack starting from the current one and navigates backward until it finds a page that satisfies the given predicate. Once the predicate condition is met, it stops navigation and returns the result.

Implementation

Future<T?> offUntil<T>(
  Widget Function() page,
  bool Function(GetPage) predicate, [
  Object? arguments,
  String? id,
]) {
  // Delegate the navigation operation to the appropriate delegate based on the provided ID
  return searchDelegate(id).offUntil(
    page,
    predicate,
    arguments,
  );
}