Closed RemeJuan closed 4 years ago
It's working well with named routes. Please read carefully readme file.
Usage predefined routes with RouteSettings
First, define the onGenerateRoute property in the MaterialApp widget like below and in switch cases you can transition to your new routes:
onGenerateRoute: (settings) {
switch (settings.name) {
case '/second':
return PageTransition(
child: SecondPage(),
type: PageTransitionType.scale,
settings: settings,
);
break;
default:
return null;
}
},
After that you can use your new route like this:
Navigator.pushNamed(context, '/second', arguments: "arguments data");
for more detail you can look example project.
closed for inactivity.
Firstly thanks, very nice component.
I was wondering if it works with named routes as I don't see any references in the docs.
I use a navigation service to simplify things so I would like to change the transition for the
replace
logic as the fade will look much nicer than a swipe for a replacement.Thanks