Skip to content

[go_router] Fix assertion failure on URLs with hash fragments missing leading slash#11431

Open
chunhtai wants to merge 2 commits intoflutter:mainfrom
chunhtai:fix-assertion-missing-slash
Open

[go_router] Fix assertion failure on URLs with hash fragments missing leading slash#11431
chunhtai wants to merge 2 commits intoflutter:mainfrom
chunhtai:fix-assertion-missing-slash

Conversation

@chunhtai
Copy link
Copy Markdown
Contributor

@chunhtai chunhtai commented Apr 3, 2026

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

@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 modifies RouteConfiguration.normalizeUri to ensure paths consistently start with a leading slash and removes trailing slashes for paths longer than one character. It includes new unit and widget tests to verify these changes and ensure that query parameters and fragments are preserved. A review comment suggests optimizing the normalization process by returning the original URI when no path changes are required to avoid unnecessary object allocation.

@chunhtai chunhtai requested a review from hannah-hyj April 3, 2026 20:15
@chunhtai chunhtai added the CICD Run CI/CD label Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD 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.

[go_router] Assertion error when navigating to hash fragments without leading slash go_router match failure for an URI without a / character

1 participant