Skip to content

Commit da43e69

Browse files
Rename to TypedQueryParameter
1 parent 7feb2ff commit da43e69

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

packages/go_router/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 17.1.0
22

3-
- Adds `TypedGoRouteParameter` annotation to override parameter names in `TypedGoRoute` constructors.
3+
- Adds `TypedQueryParameter` annotation to override parameter names in `TypedGoRoute` constructors.
44

55
## 17.0.1
66

packages/go_router/lib/src/route_data.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -622,9 +622,9 @@ class NoOpPage extends Page<void> {
622622

623623
/// Annotation to override the URI name for a route parameter.
624624
@Target({TargetKind.parameter})
625-
class TypedGoRouteParameter {
625+
class TypedQueryParameter {
626626
/// Annotation to override the URI name for a route parameter.
627-
const TypedGoRouteParameter({this.name});
627+
const TypedQueryParameter({this.name});
628628

629629
/// The name of the parameter in the URI.
630630
///
@@ -634,7 +634,7 @@ class TypedGoRouteParameter {
634634
/// ```dart
635635
/// class MyRoute extends GoRouteData with $MyRoute {
636636
/// const MyRoute({
637-
/// @TypedGoRouteParameter(name: 'custom_name') this.myParameter,
637+
/// @TypedQueryParameter(name: 'custom_name') this.myParameter,
638638
/// });
639639
/// final String myParameter;
640640
/// }

packages/go_router/test/route_data_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -795,8 +795,8 @@ void main() {
795795
);
796796
});
797797

798-
test('TypedGoRouteParameter stores the name', () {
799-
const parameter = TypedGoRouteParameter(name: 'customName');
798+
test('TypedQueryParameter stores the name', () {
799+
const parameter = TypedQueryParameter(name: 'customName');
800800

801801
expect(parameter.name, 'customName');
802802
});

0 commit comments

Comments
 (0)