-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[go_router] fix Popping state and re-rendering scaffold at the same time doesn't update the URL on web [new] #8352
base: main
Are you sure you want to change the base?
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). 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. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
example code: which contain test pop the drawer/dialog/bottomsheet. |
after_changed after_changed.MP4 |
before_change before_change.MP4 |
@chunhtai , it's already been updated. |
The unit test related to this issue has already been committed. |
…wline at the end of the file. Try adding a newline at the end of the file. • eol_at_end_of_file"
Change the 3 files of lib and add a example, because issue flutter/flutter#150312
The reason for the issue is when call
counterStream.increment();
will notifynotifyListeners()
ofStreamListener
, and finally affect_handleRouteInformationProviderNotification
of_RouterState
inpackages/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 latestRouteInformation
[but not to donotifyListeners()
].i don't know if adding
pop
toNavigatingType
is reasonable, if any place needs to be changed please tell me.Result:
After changed, the issue been solved and all the others pop not be affect such as drawer/dialog/bottomsheet, See the video below.
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, or this PR is exempt from CHANGELOG changes.///
).