popGlobalUntil method

void popGlobalUntil(
  1. Object routeName, {
  2. bool checkForDissmisable = true,
})

Pops every global route dialog and bottom sheet until current route name is routeName

Implementation

void popGlobalUntil(Object routeName, {bool checkForDissmisable = true}) {
  while ((canPop() || !checkForDissmisable) &&
      latestGlobalRoute().name != routeName) {
    pop();
  }
}