Refactor ThemeData (#91497)

This commit is contained in:
Pierre-Louis
2021-10-29 08:33:41 +02:00
committed by GitHub
parent 6602107bb2
commit 78689d347c
2 changed files with 1183 additions and 1086 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -666,88 +666,93 @@ void main() {
test('ThemeData diagnostics include all properties', () {
// List of properties must match the properties in ThemeData.hashCode()
final Set<String> expectedPropertyNames = <String>{
// GENERAL CONFIGURATION
'androidOverscrollIndicator',
'applyElevationOverlayColor',
'cupertinoOverrideTheme',
'inputDecorationTheme',
'materialTapTargetSize',
'pageTransitionsTheme',
'platform',
'scrollbarTheme',
'splashFactory',
'visualDensity',
// COLOR
'colorScheme',
'primaryColor',
'primaryColorBrightness',
'primaryColorLight',
'primaryColorDark',
'canvasColor',
'focusColor',
'hoverColor',
'shadowColor',
'accentColor',
'accentColorBrightness',
'canvasColor',
'scaffoldBackgroundColor',
'bottomAppBarColor',
'cardColor',
'dividerColor',
'focusColor',
'hoverColor',
'highlightColor',
'splashColor',
'splashFactory',
'selectedRowColor',
'unselectedWidgetColor',
'disabledColor',
'buttonTheme',
'buttonColor',
'toggleButtonsTheme',
'secondaryHeaderColor',
'textSelectionColor',
'cursorColor',
'textSelectionHandleColor',
'backgroundColor',
'dialogBackgroundColor',
'indicatorColor',
'hintColor',
'errorColor',
'toggleableActiveColor',
// TYPOGRAPHY & ICONOGRAPHY
'typography',
'textTheme',
'primaryTextTheme',
'accentTextTheme',
'inputDecorationTheme',
'iconTheme',
'primaryIconTheme',
'accentIconTheme',
'sliderTheme',
'tabBarTheme',
'tooltipTheme',
'cardTheme',
'chipTheme',
'platform',
'materialTapTargetSize',
'applyElevationOverlayColor',
'pageTransitionsTheme',
// COMPONENT THEMES
'appBarTheme',
'scrollbarTheme',
'bannerTheme',
'bottomAppBarTheme',
'colorScheme',
'bottomNavigationBarTheme',
'bottomSheetTheme',
'buttonBarTheme',
'buttonTheme',
'cardTheme',
'checkboxTheme',
'chipTheme',
'dataTableTheme',
'dialogTheme',
'dividerTheme',
'drawerTheme',
'elevatedButtonTheme',
'floatingActionButtonTheme',
'listTileTheme',
'navigationBarTheme',
'navigationRailTheme',
'typography',
'cupertinoOverrideTheme',
'snackBarTheme',
'bottomSheetTheme',
'popupMenuTheme',
'bannerTheme',
'dividerTheme',
'buttonBarTheme',
'bottomNavigationBarTheme',
'timePickerTheme',
'textButtonTheme',
'elevatedButtonTheme',
'outlinedButtonTheme',
'textSelectionTheme',
'dataTableTheme',
'checkboxTheme',
'radioTheme',
'switchTheme',
'popupMenuTheme',
'progressIndicatorTheme',
'drawerTheme',
'listTileTheme',
'fixTextFieldOutlineLabel',
'radioTheme',
'sliderTheme',
'snackBarTheme',
'switchTheme',
'tabBarTheme',
'textButtonTheme',
'textSelectionTheme',
'timePickerTheme',
'toggleButtonsTheme',
'tooltipTheme',
// DEPRECATED (newest deprecations at the bottom)
'useTextSelectionTheme',
'androidOverscrollIndicator',
'textSelectionColor',
'cursorColor',
'textSelectionHandleColor',
'accentColor',
'accentColorBrightness',
'accentTextTheme',
'accentIconTheme',
'buttonColor',
'fixTextFieldOutlineLabel',
};
final DiagnosticPropertiesBuilder properties = DiagnosticPropertiesBuilder();