Skip to content

Commit 7c1a05c

Browse files
authored
[go_router] docs: replace out dated initialRoute to initialLocation (flutter#7147)
����Updated the outdated configurations in [upgrading.md](flutter/packages@main...unliar:packages:main#diff-0acd78ed04ed5af73daeb7496126c67bd4997e3068806c90d0385f323af20e7b).
1 parent e11be1a commit 7c1a05c

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

packages/go_router/CHANGELOG.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
## NEXT
1+
## 14.2.4
22

3-
* Updates minimum supported SDK version to Flutter 3.19/Dart 3.3.
3+
- Updates minimum supported SDK version to Flutter 3.19/Dart 3.3.
4+
- Fix GoRouter configuration in `upgrading.md`
45

56
## 14.2.3
67

packages/go_router/doc/upgrading.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ home screen and creating a GoRoute for each screen you would like to be
33
deep-linkable.
44

55
# Upgrade an app that uses Navigator
6+
67
To upgrade an app that is already using the Navigator for routing, start with
78
a single route for the home screen:
89

@@ -37,6 +38,7 @@ aren't deep-linkable. You can gradually add more routes to the GoRouter
3738
configuration.
3839

3940
# Upgrade an app that uses named routes
41+
4042
An app that uses named routes can be migrated to go_router by changing each
4143
entry in the map to a GoRoute object and changing any calls to
4244
`Navigator.of(context).pushNamed` to `context.go()`.
@@ -57,7 +59,7 @@ Then the GoRouter configuration would look like this:
5759

5860
```dart
5961
GoRouter(
60-
initialRoute: '/details',
62+
initialLocation: '/details',
6163
routes: [
6264
GoRoute(
6365
path: '/',

packages/go_router/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: go_router
22
description: A declarative router for Flutter based on Navigation 2 supporting
33
deep linking, data-driven routes and more
4-
version: 14.2.3
4+
version: 14.2.4
55
repository: https://github.com/flutter/packages/tree/main/packages/go_router
66
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+go_router%22
77

0 commit comments

Comments
 (0)