Skip to content

Paint scaffold persistent bottom sheet background color behind the keyboard#186365

Draft
victorsanni wants to merge 6 commits into
flutter:masterfrom
victorsanni:persistent-sheets-backdrop
Draft

Paint scaffold persistent bottom sheet background color behind the keyboard#186365
victorsanni wants to merge 6 commits into
flutter:masterfrom
victorsanni:persistent-sheets-backdrop

Conversation

@victorsanni
Copy link
Copy Markdown
Contributor

This fix applies to persistent bottom sheets: Scaffold.bottomSheet, showBottomSheet, and ScaffoldState.showBottomSheet.

For modal bottom sheets (e.g showModalBottomSheet, showCupertinoModalPopup), the modal is pushed as a new route onto the Navigator, and so the developer remains in control of the entire modal region (including the area behind the keyboard).

However in persistent sheets Scaffold.resizeToAvoidBottomInset strips viewInsets.bottom, so the sheet is bounded by the keyboard with no control over the area behind the keyboard. So this fix adds a new Scaffold slot: _ScaffoldSlot.bottomSheetKeyboardBackdrop which adds a backdrop behind the keyboard matching the background color of the sheet.

Before:
scaffold bottomSheet before

After:
scaffold bottomSheet after

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label May 11, 2026
@github-actions github-actions Bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. and removed CICD Run CI/CD labels May 11, 2026
@victorsanni victorsanni added the CICD Run CI/CD label May 11, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label May 11, 2026
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label May 11, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label May 11, 2026
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label May 12, 2026
@victorsanni victorsanni added CICD Run CI/CD and removed CICD Run CI/CD labels May 12, 2026
@fluttergithubbot
Copy link
Copy Markdown
Contributor

An existing Git SHA, 22dd4ecdf63849a4b879efadd533835f57e1233d, was detected, and no actions were taken.

To re-trigger presubmits after closing or re-opeing a PR, or pushing a HEAD commit (i.e. with --force) that already was pushed before, push a blank commit (git commit --allow-empty -m "Trigger Build") or rebase to continue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants