mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
![]() This PR introduces a `bool useSystemColors` parameter to the `ThemeData` constructor. The goal from this PR is to enable users to easily create high contrast themes that are based on system colors for their `MaterialApp`: ```dart MaterialApp( theme: ThemeData.light(), darkTheme: ThemeData.dark(), highContrastTheme: ThemeData(useSystemColors: true, ...), highContrastDarkTheme: ThemeData(useSystemColors: true, ...), ) ``` The `MaterialApp` widget will automatically pick the correct one of the 4 themes based on system settings (light/dark mode, high contrast enabled/disabled). Depends on https://github.com/flutter/flutter/pull/164933 Closes https://github.com/flutter/flutter/issues/118853 |
||
---|---|---|
.. | ||
flutter | ||
flutter_driver | ||
flutter_goldens | ||
flutter_localizations | ||
flutter_test | ||
flutter_tools | ||
flutter_web_plugins | ||
fuchsia_remote_debug_protocol | ||
integration_test | ||
analysis_options.yaml |