-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Handle automatic PopScope #9856
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
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.
Code Review
This pull request addresses a test failure related to PopScope behavior by introducing a single tester.pump() call in packages/go_router/test/go_router_test.dart. The change is located within a test that simulates multiple back button presses and ensures that PopScope widgets have a frame to rebuild their state between gestures. The change is well-contained and the accompanying comment clearly explains its purpose. I find the change to be correct and have no further recommendations.
bc8c463 to
fa5a567
Compare
Needs one frame for PopScope to rerender after the navigation state changes.
fa5a567 to
7af232b
Compare
chunhtai
left a comment
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.
nice detective work, LGTM
flutter/packages@58c02e0...092d832 2025-08-21 engine-flutter-autoroll@skia.org Roll Flutter from 960d107 to d2ac021 (12 revisions) (flutter/packages#9866) 2025-08-21 jmccandless@google.com Handle automatic PopScope (flutter/packages#9856) 2025-08-20 engine-flutter-autoroll@skia.org Manual roll Flutter from e65380a to 960d107 (36 revisions) (flutter/packages#9862) 2025-08-20 10687576+bparrishMines@users.noreply.github.com [interactive_media_ads] Updates ProxyApis to prepare to add support for `AdEvent.ad` (flutter/packages#9785) 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
…r#174295) flutter/packages@58c02e0...092d832 2025-08-21 engine-flutter-autoroll@skia.org Roll Flutter from 960d107 to d2ac021 (12 revisions) (flutter/packages#9866) 2025-08-21 jmccandless@google.com Handle automatic PopScope (flutter/packages#9856) 2025-08-20 engine-flutter-autoroll@skia.org Manual roll Flutter from e65380a to 960d107 (36 revisions) (flutter/packages#9862) 2025-08-20 10687576+bparrishMines@users.noreply.github.com [interactive_media_ads] Updates ProxyApis to prepare to add support for `AdEvent.ad` (flutter/packages#9785) 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
…r#174295) flutter/packages@58c02e0...092d832 2025-08-21 engine-flutter-autoroll@skia.org Roll Flutter from 960d107 to d2ac021 (12 revisions) (flutter/packages#9866) 2025-08-21 jmccandless@google.com Handle automatic PopScope (flutter/packages#9856) 2025-08-20 engine-flutter-autoroll@skia.org Manual roll Flutter from e65380a to 960d107 (36 revisions) (flutter/packages#9862) 2025-08-20 10687576+bparrishMines@users.noreply.github.com [interactive_media_ads] Updates ProxyApis to prepare to add support for `AdEvent.ad` (flutter/packages#9785) 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
…r#174295) flutter/packages@58c02e0...092d832 2025-08-21 engine-flutter-autoroll@skia.org Roll Flutter from 960d107 to d2ac021 (12 revisions) (flutter/packages#9866) 2025-08-21 jmccandless@google.com Handle automatic PopScope (flutter/packages#9856) 2025-08-20 engine-flutter-autoroll@skia.org Manual roll Flutter from e65380a to 960d107 (36 revisions) (flutter/packages#9862) 2025-08-20 10687576+bparrishMines@users.noreply.github.com [interactive_media_ads] Updates ProxyApis to prepare to add support for `AdEvent.ad` (flutter/packages#9785) 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
This test was failing in flutter/flutter#152330. That PR adds a PopScope inside of nested Navigators. When a back gesture happens, the PopScope takes 1 frame to rerender and update the state of its pop handling. The test was breaking because it performed two back gestures in one frame. Putting a pump in between them fixes it when the PR is merged (and works fine without the PR too).
It took me so many hours to realize this one little pump was the fix I needed 😭 .