-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Update SnackBar to the latest Material specs. #37038
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this inverseTheme's colorScheme have a similar secondary color? Shouldn't it have a new color scheme?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe open an issue about the need for a proper inverse color scheme here.
HansMuller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
rami-a
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with one minor comment!
| final ThemeData inverseTheme = ThemeData( | ||
| brightness: brightness, | ||
| backgroundColor: themeBackgroundColor, | ||
| colorScheme: ColorScheme( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could maybe use copyWith here to make this a bit more concise since you only want to change the secondary color and the brightness.
Description
Bringing the SnackBar up to spec:
Light theme:
Dark theme:
Related Issues
Fixes #31418
Tests
Added new tests to check the background color in both light and dark themes.
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?