Skip to content

Commit

Permalink
[go_router] docs: replace out dated initialRoute to initialLocation (#…
Browse files Browse the repository at this point in the history
…7147)

����Updated the outdated configurations in [upgrading.md](main...unliar:packages:main#diff-0acd78ed04ed5af73daeb7496126c67bd4997e3068806c90d0385f323af20e7b).
  • Loading branch information
unliar authored Aug 16, 2024
1 parent e11be1a commit 7c1a05c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions packages/go_router/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## NEXT
## 14.2.4

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

## 14.2.3

Expand Down
4 changes: 3 additions & 1 deletion packages/go_router/doc/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ home screen and creating a GoRoute for each screen you would like to be
deep-linkable.

# Upgrade an app that uses Navigator

To upgrade an app that is already using the Navigator for routing, start with
a single route for the home screen:

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

# Upgrade an app that uses named routes

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

```dart
GoRouter(
initialRoute: '/details',
initialLocation: '/details',
routes: [
GoRoute(
path: '/',
Expand Down
2 changes: 1 addition & 1 deletion packages/go_router/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: go_router
description: A declarative router for Flutter based on Navigation 2 supporting
deep linking, data-driven routes and more
version: 14.2.3
version: 14.2.4
repository: https://github.com/flutter/packages/tree/main/packages/go_router
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+go_router%22

Expand Down

0 comments on commit 7c1a05c

Please sign in to comment.