removeUntilAndPush method

void removeUntilAndPush(
  1. bool predicate(
    1. PageWrapper pageWrapper
    ),
  2. String path, {
  3. String? id,
})

Removes all the previous routes until the predicate returns true.

id is used to match listeners.

Process route middlewares before remove.

Implementation

void removeUntilAndPush(
  bool Function(PageWrapper pageWrapper) predicate,
  String path, {
  String? id,
}) {
  widget._state.removeUntilAndPush(predicate, path, id: id);
}