Skip to content

Commit

Permalink
Fix deprecation message for GoRouterState.namedLocation (flutter#3092)
Browse files Browse the repository at this point in the history
Fix deprecation message for `GoRouterState.namedLocation` -- it should
point to `GoRouter.of(context).namedLocation`, not
`GoRouter.of(context).routeInformationParser.namedLocation` (the latter
does not exist).

Previously mentioned here: flutter/packages@bdc07b6#r88804919
  • Loading branch information
jorgenpt authored Feb 17, 2023
1 parent 6e4431f commit 9747469
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions packages/go_router/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 6.0.9

- Fixes deprecation message for `GoRouterState.namedLocation`

## 6.0.8

* Adds support for Iterables, Lists and Sets in query params for TypedGoRoute. [#108437](https://github.com/flutter/flutter/issues/108437).
Expand Down
3 changes: 1 addition & 2 deletions packages/go_router/lib/src/state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ class GoRouterState {

/// Get a location from route name and parameters.
/// This is useful for redirecting to a named location.
@Deprecated(
'Uses GoRouter.of(context).routeInformationParser.namedLocation instead')
@Deprecated('Use GoRouter.of(context).namedLocation instead')
String namedLocation(
String name, {
Map<String, String> params = const <String, String>{},
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: 6.0.8
version: 6.0.9
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 9747469

Please sign in to comment.