[material_ui] Respect ColorScheme.scrim in Drawer, ModalBottomSheet, and Dialog barriers - #12474
Open
JayeshJain25 wants to merge 1 commit into
Open
[material_ui] Respect ColorScheme.scrim in Drawer, ModalBottomSheet, and Dialog barriers#12474JayeshJain25 wants to merge 1 commit into
JayeshJain25 wants to merge 1 commit into
Conversation
…riers Drawer's scrim, showModalBottomSheet's barrier, and showDialog's barrier all hardcoded Colors.black54 and ignored a custom ColorScheme.scrim. Each now falls back to colorScheme.scrim at the same alpha instead of the literal black54, so default behavior is unchanged but a custom scrim color set via ColorScheme.fromSeed(..., scrim: ...) is honored. Fixes #190824
Closed
10 tasks
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates Drawer, showModalBottomSheet, and showDialog to respect ColorScheme.scrim as a fallback instead of defaulting directly to Colors.black54 when no custom barrier or scrim color is provided. Corresponding widget tests have been added to verify this behavior across all three components, and a pending changelog entry has been created. There are no review comments, so I have no feedback to provide.
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.
Drawer's scrim,showModalBottomSheet's barrier, andshowDialog's barrier all hardcodeColors.black54and never look atColorScheme.scrim, so a customscrimset viaColorScheme.fromSeed(..., scrim: ...)(or anyColorSchemeconstructor) is silently ignored.Each of the three fallback chains now ends in
colorScheme.scrimat the same alpha thatColors.black54used, instead of the literal color.ColorScheme.scrimdefaults to opaque black, so default app behavior is unchanged; a custom scrim color is now honored, matching the behavior described in the issue.This is a port of flutter/flutter#191150, which was filed against
flutter/flutterbefore Material/Cupertino were frozen there (per #188444). That PR is being closed in favor of this one.Fixes #190824
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. ↩ ↩2