defaultRouteName property Null safety
The route or path that the embedder requested when the application was launched.
Accessing this value returns the value contained in the
PlatformDispatcher singleton, so instead of getting it from here, you
should consider getting it from
WidgetsBinding isn't available, from
PlatformDispatcher.instance). The reason this value forwards to the
PlatformDispatcher is to provide convenience for applications that only
use a single main window.
This will be the string "
/" if no particular route was requested.
On a standalone engine, see https://flutter.dev/docs/development/add-to-app/android/add-flutter-screen#initial-route-with-a-cached-engine.
On iOS, the initial route can be set on the
parameter of the FlutterViewController's
On a standalone engine, see https://flutter.dev/docs/development/add-to-app/ios/add-flutter-screen#route.
String get defaultRouteName => platformDispatcher.defaultRouteName;