Repository navigation
[material_ui] Fix showModalBottomSheet safe area on display-feature sub-screens - #13428
auto-submit[bot] merged 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request modifies ModalBottomSheetRoute in bottom_sheet.dart to apply SafeArea or remove top padding inside the DisplayFeatureSubScreen's builder. This ensures the sheet receives the sub-screen's adjusted MediaQueryData instead of the root window padding, preventing safe area padding from the opposite sub-screen of a foldable device from being applied. A regression test has been added to verify this behavior, and the package version is bumped to 1.8.1. There are no review comments, and I have no feedback to provide.
e4be56c to
a4121b6
Compare
|
Hi @QuncCccccc @elliette , I have cleanly rebased on the latest main, bumped the package version to 1.10.1, and updated the changelog to resolve the earlier check issues. Could you please re-apply the CICD label to kick off the tests? Thank you! |
QuncCccccc
left a comment
There was a problem hiding this comment.
Thanks for the contribution! material_ui uses batch release, so CHANGELOG.md and the version in pubspec.yaml shouldn't be changed directly. That's why "Repository standards validation" failed earlier. Could you revert the changes to those two files and add a pending changelog file in packages/material_ui/pending_changelogs/ instead? You can copy template.yaml and fill it in with version: patch. See the "The flutter/packages changelog file" section in flutter/flutter#188444 for details.
a4121b6 to
af5749d
Compare
|
Thanks for pointing that out @QuncCccccc I've reverted the changes to pubspec.yaml and CHANGELOG.md, and added the pending changelog file with version: patch. Let me know if everything looks good now. |
elliette
left a comment
There was a problem hiding this comment.
Thanks for the contribution! Left a comment around testing, but overall looks good!
elliette
left a comment
There was a problem hiding this comment.
Thanks for updating the tests, LGTM!
|
Thank you @elliette for the review and approval, and thanks for applying the @QuncCccccc please let me know if there are any remaining changes needed on your end, or if this is good to be labeled with |
…er#197056) flutter/packages@81b7c44...898818d 2026-11-20 [email protected] [material_ui] Use correct time format for Sinhala locale (flutter/packages#13645) 2026-11-20 [email protected] [material_ui] Fix showModalBottomSheet safe area on display-feature sub-screens (flutter/packages#13428) 2026-11-20 [email protected] [material_ui] Fix M3 doc errors in the `ElevatedButton` and `FilledButton` (flutter/packages#13685) 2026-11-19 [email protected] [video_player] Convert implementation to Kotlin (flutter/packages#13683) 2026-11-19 [email protected] [flutter_svg] Add SvgLoader.provideSvgInIsolate for unsendable loaders (flutter/packages#13598) 2026-11-19 [email protected] [VPAT] Expose modal drawers with the dialog semantics role (flutter/packages#13660) 2026-11-19 [email protected] [VPAT] Keep a11y_assessments tooltips open while hovered (flutter/packages#13657) 2026-11-19 [email protected] [flutter_svg] Stabilize network SVG cache keys (flutter/packages#13597) 2026-11-19 [email protected] [image_picker_ios] Return an error instead of an empty file when an image cannot be saved (flutter/packages#12998) 2026-11-19 [email protected] [cupertino_ui] Fix CupertinoNavigationBarBackButton assertion debug (flutter/packages#13397) 2026-11-19 [email protected] [go_router] Document when GoRouterState.name and path are null (flutter/packages#13486) If this roll has caused a breakage, revert this CL and set the roller to dry run mode using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] 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
Fixes flutter/flutter#195218
Description
When
showModalBottomSheet(useSafeArea: true)is displayed on a display-feature sub-screen (such as on foldable or dual-screen devices),ModalBottomSheetRoute.buildPagepreviously wrapped the outerDisplayFeatureSubScreenwithSafeArea.Because
SafeAreawas on the outside, it read the full-screenMediaQuery.padding(e.g. an edge camera cutout on the opposite side of the unfolded device). This added padding to the root container and shifted the bottom sheet when placed on the sub-screen.This moves the
useSafeArea/MediaQuery.removePaddingwrapping insideDisplayFeatureSubScreen'sBuilder, soSafeAreareceives the sub-screen's adjustedMediaQueryDataand only avoids insets belonging to that specific sub-screen.Tests
packages/material_ui/test/bottom_sheet_test.dart:showModalBottomSheet(useSafeArea: true) does not apply safe area from opposite sub-screen.Pre-Review Checklist
[shared_preferences]///).Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩