Skip to content

Commit 9747469

Browse files
authored
Fix deprecation message for GoRouterState.namedLocation (flutter#3092)
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
1 parent 6e4431f commit 9747469

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

packages/go_router/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 6.0.9
2+
3+
- Fixes deprecation message for `GoRouterState.namedLocation`
4+
15
## 6.0.8
26

37
* Adds support for Iterables, Lists and Sets in query params for TypedGoRoute. [#108437](https://github.com/flutter/flutter/issues/108437).

packages/go_router/lib/src/state.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ class GoRouterState {
122122

123123
/// Get a location from route name and parameters.
124124
/// This is useful for redirecting to a named location.
125-
@Deprecated(
126-
'Uses GoRouter.of(context).routeInformationParser.namedLocation instead')
125+
@Deprecated('Use GoRouter.of(context).namedLocation instead')
127126
String namedLocation(
128127
String name, {
129128
Map<String, String> params = const <String, String>{},

packages/go_router/pubspec.yaml

Lines changed: 1 addition & 1 deletion
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: 6.0.8
4+
version: 6.0.9
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)