I'm using onGenerateRoute parameter on MaterialApp for routing.
MaterialApp(
...
onGenerateRoute: Router.generateRoute,
...
)
And then use pushNamed().
I want to show my route names in the url but I can't achieve that with onGenerateRoute.
If I use routes: in MaterialApp,
like this:
MaterialApp(
...
routes: {sliverScreen: (context) => SliverScreen()},
...
)
It works. But I think it's redundant if I have provided onGenerateRoute on MaterialApp.