Sitelet https://github.com/flutter/packages/pull/12530
Skip to content

[cupertino_ui] Fix covered sheet revealing root route through top gap - #12530

Merged
auto-submit[bot] merged 1 commit into
flutter:mainfrom
huahua8893:fix-cupertino-sheet
Aug 25, 2026
Merged

auto-submit[bot] merged 1 commit into
flutter:mainfrom
huahua8893:fix-cupertino-sheet

Conversation

@huahua8893

Copy link
Copy Markdown
Contributor

Ports flutter/flutter#187058 to cupertino_ui following 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-pub
  • dart run script/tool/bin/flutter_plugin_tools.dart analyze --packages cupertino_ui
  • dart run script/tool/bin/flutter_plugin_tools.dart validate --packages cupertino_ui --base-sha=252bb33ad3666c7d28621c87edccafff86e210fd --check-for-missing-changes
  • dart run script/tool/bin/flutter_plugin_tools.dart publish-check --packages cupertino_ui

Pre-Review Checklist

@github-actions github-actions Bot added p: cupertino_ui triage-design Should be looked at in design triage labels Aug 21, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 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.

@huahua8893

Copy link
Copy Markdown
Contributor Author

@dkwingsmt @victorsanni This is the migrated PR from flutter/flutter#187058. Could you please review the change here? Thank you!

@dkwingsmt dkwingsmt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you!

@Piinks Piinks added the CICD Run CI/CD label Aug 25, 2026
@dkwingsmt dkwingsmt added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 25, 2026
@auto-submit
auto-submit Bot merged commit 4fc3e81 into flutter:main Aug 25, 2026
12 checks passed
zijiehe-google-com pushed a commit to zijiehe-google-com/flutter that referenced this pull request Aug 25, 2026
…er#191734)

flutter/packages@df2ba94...740f093

2026-08-25 srawlins@google.com [cupertino_ui] Remove unused parameters
from constructors of generic classes. (flutter/packages#12457)
2026-08-25 srawlins@google.com [material_ui] Remove unused parameters
from constructors of generic classes. (flutter/packages#12458)
2026-08-25 6655696+guidezpl@users.noreply.github.com Ignore shared code
for iOS platform implementation of Google Maps plugin
(flutter/packages#12529)
2026-08-25 136096126+glitchfl@users.noreply.github.com [cross_file]
fixed `readAsString` decoding in-memory bytes as UTF-16
(flutter/packages#12479)
2026-08-25 lozhkovoi@gmail.com [cupertino_ui] Remove two items assert to
allow CupertinoTabBar to have one tab (flutter/packages#12546)
2026-08-25 huahua8893@sina.cn [cupertino_ui] Fix covered sheet revealing
root route through top gap (flutter/packages#12530)
2026-08-25 fluttergithubbot@gmail.com Sync release-go_router-18.0.0 to
main (flutter/packages#12575)
2026-08-25 fluttergithubbot@gmail.com Sync release-material_ui-1.1.0 to
main (flutter/packages#12577)
2026-08-25 fluttergithubbot@gmail.com Sync release-cupertino_ui-1.0.1 to
main (flutter/packages#12576)
2026-08-24 41930132+hellohuanlin@users.noreply.github.com
[quick_actions_ios]unskip XCUITests (flutter/packages#12436)
2026-08-24 karthimanikuttan001@gmail.com Fix RangeSlider thumb overlay
remains visible after touch interaction ends (flutter/packages#12560)
2026-08-24 victor.orozco@cloudsufi.com [google_sign_in] Increase iOS
coverage tests (flutter/packages#12484)
2026-08-24 269567208+reidbaker-agent@users.noreply.github.com
[camera_android_camerax] Migrate from dart_skills_lint to skills_lint
(flutter/packages#12543)
2026-08-24 74037732+developerashkan@users.noreply.github.com [go_router]
Clarify onEnter/redirect ordering, add regression test
(flutter/packages#12337)
2026-08-24 brunocorona.alcantar@gmail.com [material_ui] Port
flutter/flutter flutter#185149 "Slider label clips the screen"
(flutter/packages#12572)
2026-08-24 engine-flutter-autoroll@skia.org Roll Flutter from
65c9a8d to 9a82789 (17 revisions) (flutter/packages#12578)
2026-08-24 stuartmorgan@google.com [tool] Fix dart_test.yaml parsing
(flutter/packages#12574)

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
danielleon-cmd pushed a commit to victogomez-cs/packages-fork that referenced this pull request Aug 27, 2026
…flutter#12530)

Ports flutter/flutter#187058 to `cupertino_ui` following flutter/flutter#188444.

Fixes flutter/flutter#187057.

When multiple `CupertinoSheetRoute`s 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-pub`
- `dart run script/tool/bin/flutter_plugin_tools.dart analyze --packages cupertino_ui`
- `dart run script/tool/bin/flutter_plugin_tools.dart validate --packages cupertino_ui --base-sha=252bb33ad3666c7d28621c87edccafff86e210fd --check-for-missing-changes`
- `dart run script/tool/bin/flutter_plugin_tools.dart publish-check --packages cupertino_ui`

## Pre-Review Checklist
jagadeesh8682 pushed a commit to jagadeesh8682/packages that referenced this pull request Sep 2, 2026
…flutter#12530)

Ports flutter/flutter#187058 to `cupertino_ui` following flutter/flutter#188444.

Fixes flutter/flutter#187057.

When multiple `CupertinoSheetRoute`s 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-pub`
- `dart run script/tool/bin/flutter_plugin_tools.dart analyze --packages cupertino_ui`
- `dart run script/tool/bin/flutter_plugin_tools.dart validate --packages cupertino_ui --base-sha=252bb33ad3666c7d28621c87edccafff86e210fd --check-for-missing-changes`
- `dart run script/tool/bin/flutter_plugin_tools.dart publish-check --packages cupertino_ui`

## Pre-Review Checklist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD p: cupertino_ui triage-design Should be looked at in design triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CupertinoSheetRoute top gap can reveal lower routes when multiple sheets are stacked

4 participants