mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Document Window.defaultRouteName a little better. (#4851)
This commit is contained in:
parent
288fe3e4d4
commit
7e80d4f816
@ -552,8 +552,36 @@ class Window {
|
||||
_onPointerDataPacketZone = Zone.current;
|
||||
}
|
||||
|
||||
/// The route or path that the operating system requested when the application
|
||||
/// was launched.
|
||||
/// The route or path that the embedder requested when the application was
|
||||
/// launched.
|
||||
///
|
||||
/// This will be the string "`/`" if no particular route was requested.
|
||||
///
|
||||
/// ## Android
|
||||
///
|
||||
/// On Android, calling
|
||||
/// [`FlutterView.setInitialRoute`](/javadoc/io/flutter/view/FlutterView.html#setInitialRoute-java.lang.String-)
|
||||
/// will set this value. The value must be set sufficiently early, i.e. before
|
||||
/// the [runApp] call is executed in Dart, for this to have any effect on the
|
||||
/// framework. The `createFlutterView` method in your `FlutterActivity`
|
||||
/// subclass is a suitable time to set the value. The application's
|
||||
/// `AndroidManifest.xml` file must also be updated to have a suitable
|
||||
/// [`<intent-filter>`](https://developer.android.com/guide/topics/manifest/intent-filter-element.html).
|
||||
///
|
||||
/// ## iOS
|
||||
///
|
||||
/// On iOS, calling
|
||||
/// [`FlutterViewController.setInitialRoute`](/objcdoc/Classes/FlutterViewController.html#/c:objc%28cs%29FlutterViewController%28im%29setInitialRoute:)
|
||||
/// will set this value. The value must be set sufficiently early, i.e. before
|
||||
/// the [runApp] call is executed in Dart, for this to have any effect on the
|
||||
/// framework. The `application:didFinishLaunchingWithOptions:` method is a
|
||||
/// suitable time to set this value.
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * [Navigator], a widget that handles routing.
|
||||
/// * [SystemChannels.navigation], which handles subsequent navigation
|
||||
/// requests from the embedder.
|
||||
String get defaultRouteName => _defaultRouteName();
|
||||
String _defaultRouteName() native 'Window_defaultRouteName';
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user