This issue mirrors the design of https://flutter.dev/go/material-theme-system-updates
Rename the TextTheme TextStyles
Deprecate/remove the accent properties
Compute brightness, primaryColorBrightness, accentColorBrightness
Deprecate/move/remove the 21 grab-bag properties
(x) indicates number of references, excludingtheme_data.dart and tests. This can be used a proxy for disruptiveness/ease of deprecation.
Additional grab-bag properties
These grab-bag properties not in the original linked proposal, but can also be deprecated:
These factory constructor parameters can also be deprecated:
Property colors not subject to removal
- State colors like
ThemeData.disabledColor (26), ThemeData.focusColor (19), and ThemeData.hoverColor (19) have high usage and are shared amongst many components
- There is similar widespread usage for
ThemeData.highlightColor (13)
- Other parameters can remain in the factory constructor (e.g.
ThemeData.fontFamily and ThemeData.fontFamilyFallback) for convenience
Component Theme Normalization
All of the existing themes have been normalized except for the following:
This issue mirrors the design of https://flutter.dev/go/material-theme-system-updates
Rename the TextTheme TextStyles
Deprecate/remove the accent properties
Compute
brightness,primaryColorBrightness,accentColorBrightnessaccentColorBrightnessDeprecate ThemeData accentColor, accentColorBright, accentIconTheme, accentTextTheme #81336ThemeData.brightnessto be a simple getter that returnscolorScheme.brightnessThemeData.brightness == ThemeData.colorScheme.brightness #56956SearchDelegateUpdated SearchDelegate to follow custom InputDecorationTheme #55209GridTileBarRemoved GridTileBar accentColor dependency. #78574primaryColorBrightnessDeprecateprimaryColorBrightness#93396Deprecate/move/remove the 21 grab-bag properties
(x) indicates number of references, excluding
theme_data.dartand tests. This can be used a proxy for disruptiveness/ease of deprecation.ThemeData.canvasColor[ThemeData🧹] RemovecanvasColorusages #116350ThemeData.scaffoldBackgroundColor[ThemeData🧹] RemovescaffoldBackgroundColorusages #116341ThemeData.cardColor[ThemeData🧹] RemovecardColorusages #116349ThemeData.dividerColor[ThemeData🧹] RemovedividerColorusages #116347ThemeData.secondaryHeaderColor[ThemeData🧹] RemovesecondaryHeaderColorusages #116342ThemeData.hintColor[ThemeData🧹] RemovehintColorusages #116346ThemeData.splashColor(5) ⇒inkColororinkFeatureColorThemeData.unselectedWidgetColor(11) ⇒ seetoggleableActiveColordeprecationThemeData.bottomAppBarColor⇒ Deprecate ThemeData.bottomAppBarColor #111080ThemeData.selectedRowColorDeprecate ThemeData.selectedRowColor #109070ThemeData.buttonColorDeprecated ThemeData buttonColor #82196ThemeData.textSelectionColorTextSelectionTheme support (step 3 of 3) #66482ThemeData.cursorColorTextSelectionTheme support (step 3 of 3) #66482ThemeData.textSelectionHandleColorTextSelectionTheme support (step 3 of 3) #66482ThemeData.backgroundColorDeprecateThemeDataerrorColorandbackgroundColor#110162ThemeData.dialogBackgroundColorDeprecateThemeData.dialogBackgroundColorin favor ofDialogThemeData.backgroundColor#155072ThemeData.indicatorColorDeprecateThemeData.indicatorColorin favor ofTabBarThemeData.indicatorColor#160024ThemeData.errorColorDeprecateThemeDataerrorColorandbackgroundColor#110162ThemeData.toggleableActiveColorDeprecatetoggleableActiveColor#97972Additional grab-bag properties
These grab-bag properties not in the original linked proposal, but can also be deprecated:
ThemeData.shadowColor[ThemeData🧹] RemoveshadowColorusages #116343ThemeData.splashFactory(4) ⇒inkFactoryorinkFeatureFactoryprimaryColorDeprecateThemeData.primaryX#110848primaryColorDark[ThemeData🧹] RemoveprimaryColorLight&primaryColorDarkusages #116362primaryColorLight[ThemeData🧹] RemoveprimaryColorLight&primaryColorDarkusages #116362ThemeData.fixTextFieldOutlineLabelDeprecate ThemeData.fixTextFieldOutlineLabel #87281These factory constructor parameters can also be deprecated:
primarySwatchfromThemeDatafactory constructor (8) ⇒colorSchemeorcolorSchemeSeedColor(related DeprecateColorScheme.fromSwatch#120064)Property colors not subject to removal
ThemeData.disabledColor(26),ThemeData.focusColor(19), andThemeData.hoverColor(19) have high usage and are shared amongst many componentsThemeData.highlightColor(13)ThemeData.fontFamilyandThemeData.fontFamilyFallback) for convenienceComponent Theme Normalization
All of the existing themes have been normalized except for the following:
AppBarThemeNormalize AppBarTheme #169130BottomAppBarThemeNormalize BottomAppBarTheme #168586InputDecorationThemeNormalize input decoration theme #168981CardThemeNormalize Card theme #151914ChipThemeReland "ChipThemeData is now conventional" #94179DialogThemeNormalize Dialog theme #153982ListTileThemeReland Refactored ListTileTheme: ListTileThemeData, ThemeData.listThemeData #91840SnackBarThemeAdd SnackBarTheme #180001TabBarThemeNormalize TabBarTheme #155476