packages
packages copied to clipboard
[go_router] Fix Popping state and re-rendering scaffold at the same time doesn't update the URL on web #150312
Change the 3 file palce, because issue #150312
The reason for the issue is when call counterStream.increment(); will notify notifyListeners() of StreamListener, and finally affect _handleRouteInformationProviderNotification of _RouterState in packages/flutter/lib/src/widgets/router.dart.
When pop should not call _handleRouteInformationProviderNotification otherwise will be path wrong.
because the value of GoRouteInformationProvider is not the latest.
solution:
always make the value of GoRouteInformationProvider knew the latest RouteInformation[but not to do notifyListeners()].
i don't know if adding pop to NavigatingType is reasonable, if any place needs to be changed please tell me.
Pre-launch Checklist
i was run shell_route_test.dart to check the change I am making, all existing and new tests are passing.
- [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
- [x] I read the [Tree Hygiene] page, which explains my responsibilities.
- [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use
dart format.) - [x] I signed the [CLA].
- [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g.
[shared_preferences] - [x] I [linked to at least one issue that this PR fixes] in the description above.
- [ ] I updated
pubspec.yamlwith an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [ ] I updated
CHANGELOG.mdto add a description of the change, [following repository CHANGELOG style], or this PR is [exempt from CHANGELOG changes]. - [x] I updated/added relevant documentation (doc comments with
///). - [x] I added new tests to check the change I am making, or this PR is [test-exempt].
- [x] All existing and new tests are passing.
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).
If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?
Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
Is this a big deal?
Is this a big deal?
this email is my new computer set, i was forget to set, but know, i've set.
Hi @ahyangnb Are you still planning on coming back to this pr?
Hi @ahyangnb Are you still planning on coming back to this pr? yes
Hi @ahyangnb I am going to close this pr for now, feel free to reopen once you have time
hi, can we open it again? this pr is already tested by myself and no mistake with the code view
Is this a big deal?