RouteFactory onGenerateRoute

The route generator callback used when the app is navigated to a named route.

This is used if routes does not contain the requested route.

If this returns null when building the routes to handle the specified initialRoute, then all the routes are discarded and Navigator.defaultRouteName is used instead (/). See initialRoute.

During normal app operation, the onGenerateRoute callback will only be applied to route names pushed by the application, and so should never return null.


final RouteFactory onGenerateRoute