We can use Named Routing with flutter in an efficient way with extension methods.
With these extension methods we have less chances to committing any error or typo.
And in MyApp widget use it accordingly.
With Navigator.pushNamed(); we can use it in the following way --
Top comments (5)
Great explanation.
what if you need to pass perimeters.
You can use arguments for that.
Navigator.pushNamed(context, RouteName, argument: data);
Retrive it by - ModalRoute.of(context).settings.arguments
what if you need to pass parameters