Reland "Refactor ThemeData (#91497)" (part 1) (#92822)

This commit is contained in:
Pierre-Louis 2021-11-01 21:09:13 +01:00 committed by GitHub
parent fb1f8b0e38
commit 3ccf730ad7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1105 additions and 1019 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();