Document that you can't change initialRoute usefully (#130450)
Fixes https://github.com/flutter/flutter/issues/12454
This commit is contained in:
parent
28dfd836e2
commit
9c8ee4fab6
@ -725,6 +725,10 @@ class WidgetsApp extends StatefulWidget {
|
||||
/// [routes], [onGenerateRoute], or [onUnknownRoute]); if they are not,
|
||||
/// [initialRoute] must be null and [builder] must not be null.
|
||||
///
|
||||
/// Changing the [initialRoute] will have no effect, as it only controls the
|
||||
/// _initial_ route. To change the route while the application is running, use
|
||||
/// the [Navigator] or [Router] APIs.
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * [Navigator.initialRoute], which is used to implement this property.
|
||||
|
@ -1470,6 +1470,10 @@ class Navigator extends StatefulWidget {
|
||||
///
|
||||
/// The value is interpreted according to [onGenerateInitialRoutes], which
|
||||
/// defaults to [defaultGenerateInitialRoutes].
|
||||
///
|
||||
/// Changing the [initialRoute] will have no effect, as it only controls the
|
||||
/// _initial_ route. To change the route while the application is running, use
|
||||
/// the static functions on this class, such as [push] or [replace].
|
||||
final String? initialRoute;
|
||||
|
||||
/// Called to generate a route for a given [RouteSettings].
|
||||
|
Loading…
x
Reference in New Issue
Block a user