-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[go_router] Fixes an issue where the params are removed after popping #3401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e5bd7f1
to
66fb445
Compare
packages/go_router/CHANGELOG.md
Outdated
- Aligns Dart and Flutter SDK constraints. | ||
- Updates compileSdkVersion to 33. | ||
- Updates example app to iOS 11. | ||
|
||
## 6.2.0 | ||
|
||
- Export supertypes in route_data.dart library | ||
- Export supertypes in route_data.dart library. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exports
router.go('/123'); | ||
await tester.pumpAndSettle(); | ||
expect(find.text('2 123'), findsOneWidget); | ||
// The query parameter is removed, so is the location in first page. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this comment mean here? which query parameter and location in first page is removed?
// The query parameter is removed, so is the location in first page. | ||
router.pop(); | ||
await tester.pump(); | ||
expect(find.text('2 123'), findsOneWidget); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get why it's still at page 2 after poping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a comment to explain.
66fb445
to
7313652
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
7313652
to
aa4d6a6
Compare
…flutter#3401) [go_router] Fixes an issue where the params are removed after popping
pop will remove pathparameter from routeMatchList, and the goRouterState also use the same reference to the pathparameter in the routeMatchList, thus parameters got removed as well
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.