divyanshub024 / Flutter-route-transition

Repo for blog: Everything you need to know about Flutter page route transition
https://medium.com/flutter-community/everything-you-need-to-know-about-flutter-page-route-transition-9ef5c1b32823
161 stars 31 forks source link

Named routes #2

Open billymahmood opened 5 years ago

billymahmood commented 5 years ago

Hi amazing work, I just wanted to know if it's possible to use this code with named routes?

Thank you.

LtotheWT commented 5 years ago

onGenerateRoute: (RouteSettings settings){ switch(settings.name){ case SecondPage.routeName: Map<String, dynamic> args = settings.arguments; return EnterExitRoute(exitPage: FirstPage(), enterPage: SecondPage(param: args["param"],)); case ThirdPage.routeName: return EnterExitRoute(exitPage: SecondPage(), enterPage: ThirdPage()); } return null; }, cheers