until method
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:
Get.until((route) => Get.currentRoute == '/home')so when you get to home page,
or also like this:
Get.until((route) => !Get.isDialogOpen()), to make sure the
dialog is closed
Implementation
void until(bool Function(FlowerPage<dynamic>) predicate, {int? id}) {
// if (key.currentState.mounted) // add this if appear problems on future with route navigate
// when widget don't mounted
return searchDelegate(id).backUntil(predicate);
}