Skip to content

[material_ui] Paint Dialog.fullscreen background color behind the keyboard - #13244

Merged
auto-submit[bot] merged 5 commits into
flutter:mainfrom
victorsanni:fullscreen-dialog-keyboard
Nov 6, 2026
Merged

auto-submit[bot] merged 5 commits into
flutter:mainfrom
victorsanni:fullscreen-dialog-keyboard

Conversation

@victorsanni

Copy link
Copy Markdown
Contributor

Found while investigating flutter/flutter#179482 (design: https://flutter.dev/go/ios-26-keyboard-bleed). Companion to #13242, which does the same for Scaffold persistent bottom sheets.

Dialog builds AnimatedPadding(viewInsets) → Material, so when a text field inside a Dialog.fullscreen is focused, the "fullscreen" surface shrinks to the area above the keyboard and the DialogRoute barrier is what sits behind the keyboard. On iOS 26 the keyboard is translucent, so the dimmed route underneath shows through under the dialog instead of the dialog's color. Since Dialog.fullscreen also removes viewInsets from child, apps can't work around it from inside the dialog.

For Dialog.fullscreen, the AnimatedPadding and MediaQuery.removeViewInsets now sit inside the Material, so the surface keeps covering the whole screen while child is laid out above the keyboard exactly as before. Regular Dialogs are unchanged.

Part of flutter/flutter#179482.

Before

before: the dimmed route behind the dialog shows through the keyboard

After

after: the dialog's surface continues behind the keyboard

Pre-Review Checklist

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2

…board

Dialog builds AnimatedPadding(viewInsets) -> Material, so when a text field
inside a Dialog.fullscreen is focused the "fullscreen" surface shrinks to the
area above the keyboard and the DialogRoute barrier is what sits behind the
keyboard. On iOS 26 the keyboard is translucent, so the dimmed route
underneath shows through under the dialog instead of the dialog's color.
Since Dialog.fullscreen also removes viewInsets from its child, apps can't
work around this from inside the dialog.

For Dialog.fullscreen, the AnimatedPadding and MediaQuery.removeViewInsets
now sit inside the Material, so the surface keeps covering the whole screen
while the child is laid out above the keyboard exactly as before. Regular
Dialogs are unchanged.

Part of flutter/flutter#179482.
@github-actions github-actions Bot added p: material_ui triage-design Should be looked at in design triage labels Oct 13, 2026
@victorsanni victorsanni added the CICD Run CI/CD label Oct 13, 2026
@victorsanni
victorsanni marked this pull request as ready for review October 13, 2026 23:44

@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 Dialog to keep the Material of a fullscreen dialog covering the entire screen behind the software keyboard, while keeping its child content above the keyboard. The view insets avoidance logic is refactored into a private helper method _avoidViewInsets and applied to both fullscreen and standard dialog layouts. Additionally, a widget test is added to verify this layout behavior, and a pending changelog entry is included. There are no review comments, and I have no feedback to provide.

@elliette
elliette self-requested a review October 27, 2026 21:22

@elliette elliette left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! One suggestion but LGTM

@victorsanni victorsanni added CICD Run CI/CD autosubmit Merge PR when tree becomes green via auto submit App and removed CICD Run CI/CD labels Nov 5, 2026
@victorsanni victorsanni added CICD Run CI/CD and removed CICD Run CI/CD labels Nov 6, 2026
@auto-submit
auto-submit Bot merged commit 63881f9 into flutter:main Nov 6, 2026
13 checks passed
flutter-zl pushed a commit to NemesisDevX/flutter that referenced this pull request Nov 6, 2026
flutter/packages@0478162...63881f9

2026-11-06 [email protected] [material_ui] Paint Dialog.fullscreen
background color behind the keyboard (flutter/packages#13244)
2026-11-05 [email protected] [material_ui] Add tabBar/tab
roles and expanded state semantics (flutter/packages#13176)
2026-11-05 [email protected]
[material_ui] Disable the DropdownButtonFormField decoration when the
field is disabled (flutter/packages#13473)
2026-11-05 [email protected] [material_ui] Fix Switch throwing when first
painted mid-animation (flutter/packages#13496)
2026-11-05 [email protected] [various] Add
engineIdentifier to fake plugin registrars (flutter/packages#13574)
2026-11-05 [email protected] [google_sign_in]
Allow GoogleSignIn-iOS 10 (flutter/packages#13306)
2026-11-05 [email protected] [material_ui] Hit
test the floating label of InputDecorator at its painted position
(flutter/packages#13326)
2026-11-05 [email protected] [material_ui] Fix InputDecorator
intrinsic height when isDense or isC… (flutter/packages#13522)
2026-11-05 [email protected] [material_ui] Paint Scaffold
persistent bottom sheet background color behind the keyboard
(flutter/packages#13242)
2026-11-05 [email protected] [image_picker_ios] PR 5/5 Switch
Pigeon to Swift and finish the Objective-C to Swift migration.
(flutter/packages#13493)

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
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: material_ui triage-design Should be looked at in design triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants