flutter-packages
flutter-packages copied to clipboard
Dynamic color does not respect system's color contrast setting
Package
dynamic_color
Existing issue?
- [X] I checked the existing issues
What happened?
Expected vs actual result:
- Material 3 has introduced user-controlled color contrast which allows users to select three levels of contrast:
- According to the linked specification, the color scheme should "automatically" inherit the system contrast settings. However, the
dynamic_colorplugin does not respect this setting. The colors provided by the plugin are always the same irrespective of the contrast setting.
Steps to reproduce:
- Create a Flutter app and add the
dynamic_colorpackage. - Use
DynamicColorBuilderto get the light and dark color schemes. - Run the app on Android where the contrast setting is supported. To change the contrast, go to Developer Options > Contrast.
- After changing the contrast, open another app where dynamic color is supported like Google Drive to observe the differences.
- Reopen the Flutter app. It can be observed that the colors do not change as per the selected contrast option.
The dynamic_color plugin has additional critical issues (such as broken dynamic tone-based and fixed color roles, #574, #582) that have impacted Flutter for an extended period. This plugin provides one of the key features of Material 3 for Flutter. However, it has not been updated for over 7-8 months.
Hoping to see these issues prioritized and addressed soon.
Relevant log output
No response