gurleensethi / sailor

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

Add support for modal navigation transitions #13

Open kuhnroyal opened 4 years ago

kuhnroyal commented 4 years ago

Coming from Fluro, I am missing modal transitions. I tried using a custom generator function as workaround but ArgumentsWrapper is not public so I can't access the pages params.

It would be nice if the the modal transitions would use platform specific page routes.

gurleensethi commented 4 years ago

Hi @kuhnroyal Could you please provide a code example of what you are looking for and what your concern is.

kuhnroyal commented 4 years ago

Basically MaterialPageRoute and CupertinoPageRoute have a bool fullscreenDialog property which I need to set to true. When I defined a SailorRoute, I want to specify this, or optionally when navigating.

Fluro has a custom transition for this. But I think it should be some kind of route property, so it can be combined with a custom transition.

From Fluro: https://github.com/theyakka/fluro/blob/master/lib/src/router.dart#L138

          return MaterialPageRoute<dynamic>(
              settings: routeSettings,
              fullscreenDialog: transition == TransitionType.nativeModal,
              builder: (BuildContext context) {
                return handler.handlerFunc(context, parameters);
              });
PandaGeek1024 commented 4 years ago

any update on this?

dalewking commented 4 years ago

I would like to see allowing PopupRoutes which lets you do named navigation to show a dialog like an error message.

DustinJSilk commented 4 years ago

Any update on this? Looking for fullscreenDialog, opening modals from the router, as well as using a custom MaterialPageRoute in the build function but can only return a Widget, meaning i cant use a library like https://pub.dev/packages/modal_bottom_sheet