gurleensethi / sailor

Easy page navigation and management in Flutter apps.
https://pub.dev/packages/sailor
MIT License
145 stars 24 forks source link

Does Sailor can Navigate without returning to the first page? #14

Closed mohammedbabelly closed 4 years ago

mohammedbabelly commented 5 years ago

as in Flutter 'pushNamedAndRemoveUntil'

gurleensethi commented 4 years ago

Yes, you can achieve this using NavigationType.

Routes.sailor.navigate(
  "route_name",
  navigationType: NavigationType.pushAndRemoveUntil,
  removeUntilPredicate: (route) {
    // You logic here
    return route.settings.name != "some_name";
  }
);