until method

void until(
  1. bool predicate(
    1. SintPage
    ), {
  2. String? id,
})

Navigation.popUntil() shortcut.

Calls pop several times in the stack until predicate returns true

id is for when you are using nested navigation, as explained in documentation

predicate can be used like this: Sint.until((route) => Sint.currentRoute == '/home')so when you get to home page,

or also like this: Sint.until((route) => !Sint.isDialogOpen()), to make sure the dialog is closed

Implementation

void until(bool Function(SintPage<dynamic>) predicate, {String? id}) {
  return searchDelegate(id).backUntil(predicate);
}