Skip to content

[go_router] Add TypedQueryParameter annotation#10792

Merged
auto-submit[bot] merged 6 commits intoflutter:mainfrom
ValentinVignal:go-router/Add-typed-go-router-parameter
Feb 3, 2026
Merged

[go_router] Add TypedQueryParameter annotation#10792
auto-submit[bot] merged 6 commits intoflutter:mainfrom
ValentinVignal:go-router/Add-typed-go-router-parameter

Conversation

@ValentinVignal
Copy link
Contributor

Relates to flutter/flutter#112152

Adds TypedGoRouteParameter annotation

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2 3

@github-actions github-actions bot added p: go_router triage-framework Should be looked at in framework triage labels Jan 14, 2026
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the TypedGoRouteParameter annotation, which allows developers to customize URI parameter names in type-safe routes. The changes include the new annotation class, updates to the pubspec.yaml and CHANGELOG.md, and a unit test for the new class. My feedback focuses on ensuring the documentation for this new feature is clear and consistent with existing conventions.

@ValentinVignal
Copy link
Contributor Author

go_router_builder PR: #10793

@ValentinVignal ValentinVignal force-pushed the go-router/Add-typed-go-router-parameter branch from c704608 to ab858c7 Compare January 25, 2026 08:40
@ValentinVignal ValentinVignal changed the title [go_router] Add TypedGoRouteParameter annotation [go_router] Add TypedQueryParameter annotation Jan 25, 2026
@ValentinVignal ValentinVignal force-pushed the go-router/Add-typed-go-router-parameter branch from ab858c7 to acfcffe Compare January 25, 2026 08:53
@ValentinVignal ValentinVignal force-pushed the go-router/Add-typed-go-router-parameter branch from acfcffe to da43e69 Compare January 25, 2026 08:55
@ValentinVignal ValentinVignal force-pushed the go-router/Add-typed-go-router-parameter branch from da43e69 to 6117e04 Compare January 27, 2026 08:43
/// This will result in a route that matches
/// `/my-route?custom_name=some_value` instead of the default
/// `/my-route?my-parameter=some_value`.
final String? name;
Copy link
Contributor

Choose a reason for hiding this comment

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

as we discussed, can you add some documentation around escaped character

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, I added a sentence in fix changelog and add more doc. Is that okay for you?

@@ -1,3 +1,7 @@
# 17.1.0
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
# 17.1.0
## 17.1.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ValentinVignal ValentinVignal force-pushed the go-router/Add-typed-go-router-parameter branch from 6117e04 to e53ebe5 Compare February 1, 2026 10:33
Copy link
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

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

LGTM

@chunhtai chunhtai requested a review from hannah-hyj February 2, 2026 18:01
Copy link
Member

@hannah-hyj hannah-hyj left a comment

Choose a reason for hiding this comment

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

LGTM

@ValentinVignal ValentinVignal added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 3, 2026
@auto-submit auto-submit bot merged commit 2662b91 into flutter:main Feb 3, 2026
81 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 3, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 3, 2026
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Feb 3, 2026
flutter/packages@837dbbd...5b1bea8

2026-02-03 30872003+misos1@users.noreply.github.com
[camera_avfoundation] handle interruptions and use single offset
(flutter/packages#8982)
2026-02-03 32538273+ValentinVignal@users.noreply.github.com [go_router]
Add `TypedQueryParameter` annotation (flutter/packages#10792)
2026-02-02 okorohelijah@google.com [local_auth_darwin][UIScene] Add
UIScene lifecycle support (flutter/packages#10836)
2026-02-02 49699333+dependabot[bot]@users.noreply.github.com
[dependabot]: Bump camerax_version from 1.5.2 to 1.5.3 in
/packages/camera/camera_android_camerax/android (flutter/packages#10946)
2026-02-02 49699333+dependabot[bot]@users.noreply.github.com
[dependabot]: Bump gradle-wrapper from 8.13 to 9.3.1 in
/packages/video_player/video_player/example/android/app
(flutter/packages#10945)
2026-02-02 49699333+dependabot[bot]@users.noreply.github.com
[dependabot]: Bump gradle-wrapper from 8.13 to 9.3.1 in
/packages/local_auth/local_auth_android/example/android/app
(flutter/packages#10941)
2026-02-02 engine-flutter-autoroll@skia.org Roll Flutter from
9eafba4 to c305f1f (12 revisions) (flutter/packages#10956)
2026-02-02 engine-flutter-autoroll@skia.org Roll Flutter from
1d9d6a9 to 9eafba4 (27 revisions) (flutter/packages#10938)
2026-02-02 49699333+dependabot[bot]@users.noreply.github.com
[dependabot]: Bump org.json:json from 20250517 to 20251224 in
/packages/in_app_purchase/in_app_purchase_android/android
(flutter/packages#10949)
2026-02-02 49699333+dependabot[bot]@users.noreply.github.com
[dependabot]: Bump the test-dependencies group across 2 directories with
1 update (flutter/packages#10944)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
auto-submit bot pushed a commit that referenced this pull request Feb 4, 2026
…mize parameter names (#10793)

Relates to flutter/flutter#112152

Add support for `@TypedGoRouteParameter` to customize parameter names

Needs #10792 to get merged first

## Pre-Review Checklist

**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
LongCatIsLooong pushed a commit to LongCatIsLooong/flutter that referenced this pull request Feb 6, 2026
…er#181857)

flutter/packages@837dbbd...5b1bea8

2026-02-03 30872003+misos1@users.noreply.github.com
[camera_avfoundation] handle interruptions and use single offset
(flutter/packages#8982)
2026-02-03 32538273+ValentinVignal@users.noreply.github.com [go_router]
Add `TypedQueryParameter` annotation (flutter/packages#10792)
2026-02-02 okorohelijah@google.com [local_auth_darwin][UIScene] Add
UIScene lifecycle support (flutter/packages#10836)
2026-02-02 49699333+dependabot[bot]@users.noreply.github.com
[dependabot]: Bump camerax_version from 1.5.2 to 1.5.3 in
/packages/camera/camera_android_camerax/android (flutter/packages#10946)
2026-02-02 49699333+dependabot[bot]@users.noreply.github.com
[dependabot]: Bump gradle-wrapper from 8.13 to 9.3.1 in
/packages/video_player/video_player/example/android/app
(flutter/packages#10945)
2026-02-02 49699333+dependabot[bot]@users.noreply.github.com
[dependabot]: Bump gradle-wrapper from 8.13 to 9.3.1 in
/packages/local_auth/local_auth_android/example/android/app
(flutter/packages#10941)
2026-02-02 engine-flutter-autoroll@skia.org Roll Flutter from
9eafba4 to c305f1f (12 revisions) (flutter/packages#10956)
2026-02-02 engine-flutter-autoroll@skia.org Roll Flutter from
1d9d6a9 to 9eafba4 (27 revisions) (flutter/packages#10938)
2026-02-02 49699333+dependabot[bot]@users.noreply.github.com
[dependabot]: Bump org.json:json from 20250517 to 20251224 in
/packages/in_app_purchase/in_app_purchase_android/android
(flutter/packages#10949)
2026-02-02 49699333+dependabot[bot]@users.noreply.github.com
[dependabot]: Bump the test-dependencies group across 2 directories with
1 update (flutter/packages#10944)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App p: go_router triage-framework Should be looked at in framework triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants