-
Notifications
You must be signed in to change notification settings - Fork 29.1k
Description
The following proposal is from the "Deprecate/remove the accent properties" section of flutter.dev/go/material-theme-system-updates.
The Material Design spec no longer includes a color called ‘accent’. The ‘secondary’ color scheme color is roughly equivalent. The overall theme’s accent properties are rarely used within Flutter itself. For example the accentIconTheme is only used by FloatingActionButton and in that case, it’s only used (in one expression) for the sake of backwards compatibility. The accentColorBrightness property is only used by GridTile. We plan to replace component dependencies on the accent properties with dependencies on component themes, and the overall theme’s color scheme and text theme.
Color accentColor;
Brightness accentColorBrightness;
TextTheme accentTextTheme;
IconThemeData accentIconTheme;
The process for removing these properties will take a considerable amount of time because they’ve been around since early versions of Flutter.
- Remove dependencies - but not definitions - from Flutter.
- When all of the accent properties dependencies have been removed, send a breaking change announcement.
- Deprecate the properties and constructor parameters.
- Remove the deprecated properties and constructor parameters.
accentColor
The following classes still depend on accentColor
(checked items have been updated):
- BottomNavigationBar PR: Removed BottomNavigationBar accentColor dependency #76810
- CheckboxListTile PR: Removed CheckboxListTile accentColor dependency #76908
- ExpansionTile: PR: Redo Removed accentColor dependency from ExpansionTile #79829
Original PR was reverted: Removed accentColor dependency from ExpansionTile #77933
Added Added iconColor and textColor properties to ExpansionTile #78281 to enable migrating existing apps that depended on accentColor.
Added Use ColorScheme.primary (not secondary), ExpansionTile expanded color #81241 - use primary instead of secondary for expanded icons/titles. - FloatingActionButton Removed FloatingActionButton accentColor dependency. #78296
Some of this work was completed, see flutter.dev/go/remove-fab-accent-theme-dependency and Step 2 of 2: Remove Flutter's FloatingActionButton dependency on ThemeData accent properties #46923. - GridTileBar PR: Removed GridTileBar accentColor dependency. #78574
- InputDecorator PR: Removed InputDecorator accentColor dependency. #77999
- ListTile PR: Removed ListTile accentColor dependency #77004
- MaterialApp PR: Removed MaterialApp accentColor dependency. #77652
- ProgressIndicator PR: Removed ProgressIndicator accentColor dependency. #77976
- Added a ProgressIndicatorTheme. PR: #81075
- PaginatedDataTable PR: Removed PaginatedDataTable accentColor dependency. #77744
- RadioListTile PR: Removed RadioListTile accentColor dependency #76906
- RefreshIndicator PR: Removed RefreshIndicator accentColor dependency. #77884
- Stepper PR: Removed Stepper accentColor dependency #77732
- SwitchListTile PR: Removed SwitchListTile accentColor dependency #76909
- TabPageSelector PR: Removed TabPageSelector accentColor dependency. #77997
accentTextTheme
The following classes still depend on accentTextTheme
(checked items have been updated):
- TimePicker PR: Removed TimePicker dependence on accentTextTheme. #78771
- DayPicker PR: Removed DayPicker dependence on accentColor. #78576
This class is deprecated. - Typography PR: Removed accentTextTheme references from Typography API doc #78371