Skip to content

[go_router] docs: replace out dated initialRoute to initialLocation #7147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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