[cupertino_ui] Fix covered sheet revealing root route through top gap - #12530
Open
huahua8893 wants to merge 1 commit into
Open
[cupertino_ui] Fix covered sheet revealing root route through top gap#12530huahua8893 wants to merge 1 commit into
huahua8893 wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request modifies the widget tree in _CupertinoSheetTransitionState to wrap the Padding widget with _coverSheetSecondaryTransition instead of having Padding wrap the transition. This prevents lower routes from being revealed through the top gap when multiple CupertinoSheetRoutes are stacked. A new widget test has been added to verify this layout behavior, and a pending changelog entry has been created. There are no review comments to evaluate.
Author
|
@dkwingsmt @victorsanni This is the migrated PR from flutter/flutter#187058. Could you please review the change here? Thank you! |
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports flutter/flutter#187058 to
cupertino_uifollowing flutter/flutter#188444.Fixes flutter/flutter#187057.
When multiple
CupertinoSheetRoutes are stacked, the covered sheet's top gap can reveal the root route because the top-gap padding sits outside the secondary route transition.This change applies the covered sheet's secondary transition outside the top-gap padding, so the sheet and its gap move together. It also adds a coordinate-based regression test that verifies the root route remains fully covered.
Tests
flutter test test/sheet_test.dart --no-pubdart run script/tool/bin/flutter_plugin_tools.dart analyze --packages cupertino_uidart run script/tool/bin/flutter_plugin_tools.dart validate --packages cupertino_ui --base-sha=252bb33ad3666c7d28621c87edccafff86e210fd --check-for-missing-changesdart run script/tool/bin/flutter_plugin_tools.dart publish-check --packages cupertino_uiPre-Review Checklist