initialRoute property

String initialRoute

The name of the first route to show, if a Navigator is built.

Defaults to Window.defaultRouteName, which may be overridden by the code that launched the application.

If the route contains slashes, then it is treated as a "deep link", and before this route is pushed, the routes leading to this one are pushed also. For example, if the route was /a/b/c, then the app would start with the three routes /a, /a/b, and /a/b/c loaded, in that order.

If any part of this process fails to generate routes, then the initialRoute is ignored and Navigator.defaultRouteName is used instead (/). This can happen if the app is started with an intent that specifies a non-existent route. The Navigator is only built if routes are provided (either via home, routes, onGenerateRoute, or onUnknownRoute); if they are not, initialRoute must be null and builder must not be null.

See also:


final String initialRoute