Skip to content
5 changes: 5 additions & 0 deletions packages/go_router/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 8.0.2

- Preserves route name case when caching `_nameToPath` by not using `toLowerCase()`.<br>
this is useful to make route names case sensitive
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Preserves route name case when caching `_nameToPath` by not using `toLowerCase()`.<br>
this is useful to make route names case sensitive
- Makes namedLocation and route name related APIs case sensitive.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, will write the test

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the test and modified the changelog as suggested.
Do you have any other comments or suggestions in mind?
Thanks ✌️


## 8.0.1

- Fixes a link for an example in `path` documentation.
Expand Down
4 changes: 2 additions & 2 deletions packages/go_router/lib/src/configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class RouteConfiguration {
'${queryParameters.isEmpty ? '' : ', queryParameters: $queryParameters'}');
return true;
}());
final String keyName = name.toLowerCase();
final String keyName = name;
assert(_nameToPath.containsKey(keyName), 'unknown route name: $name');
final String path = _nameToPath[keyName]!;
assert(() {
Expand Down Expand Up @@ -564,7 +564,7 @@ class RouteConfiguration {
final String fullPath = concatenatePaths(parentFullPath, route.path);

if (route.name != null) {
final String name = route.name!.toLowerCase();
final String name = route.name!;
assert(
!_nameToPath.containsKey(name),
'duplication fullpaths for name '
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: 8.0.1
version: 8.0.2
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