-
Notifications
You must be signed in to change notification settings - Fork 30.3k
☂️ Material Theme System Updates #91772
Copy link
Copy link
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
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