onGenerateInitialRoutes property
final
Called when the widget is created to generate the initial list of Route objects if initialRoute is not null.
Defaults to defaultGenerateInitialRoutes.
The NavigatorState and initialRoute will be passed to the callback. The callback must return a list of Route objects with which the history will be primed.
Implementation
final RouteListFactory onGenerateInitialRoutes