diff --git a/packages/flutter/lib/src/material/theme_data.dart b/packages/flutter/lib/src/material/theme_data.dart index b4b5b5d8a75..ad40c74b007 100644 --- a/packages/flutter/lib/src/material/theme_data.dart +++ b/packages/flutter/lib/src/material/theme_data.dart @@ -220,49 +220,94 @@ class ThemeData with Diagnosticable { /// * [ThemeData.light], which creates a light blue theme. /// * [ThemeData.dark], which creates dark theme with a teal secondary [ColorScheme] color. factory ThemeData({ - Brightness? brightness, + // GENERAL CONFIGURATION + AndroidOverscrollIndicator? androidOverscrollIndicator, + bool? applyElevationOverlayColor, + NoDefaultCupertinoThemeData? cupertinoOverrideTheme, + InputDecorationTheme? inputDecorationTheme, + MaterialTapTargetSize? materialTapTargetSize, + PageTransitionsTheme? pageTransitionsTheme, + TargetPlatform? platform, + ScrollbarThemeData? scrollbarTheme, + InteractiveInkFeatureFactory? splashFactory, VisualDensity? visualDensity, + // COLOR + // [colorScheme] is the preferred way to configure colors. The other color + // properties (as well as brightness, primaryColorBrightness, and primarySwatch) + // will gradually be phased out, see https://github.com/flutter/flutter/issues/91772. + ColorScheme? colorScheme, + Brightness? brightness, MaterialColor? primarySwatch, Color? primaryColor, Brightness? primaryColorBrightness, Color? primaryColorLight, Color? primaryColorDark, - @Deprecated( - 'Use colorScheme.secondary instead. ' - 'For more information, consult the migration guide at ' - 'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. ' - 'This feature was deprecated after v2.3.0-0.1.pre.', - ) - Color? accentColor, - @Deprecated( - 'No longer used by the framework, please remove any reference to it. ' - 'For more information, consult the migration guide at ' - 'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. ' - 'This feature was deprecated after v2.3.0-0.1.pre.', - ) - Brightness? accentColorBrightness, - Color? canvasColor, + Color? focusColor, + Color? hoverColor, Color? shadowColor, + Color? canvasColor, Color? scaffoldBackgroundColor, Color? bottomAppBarColor, Color? cardColor, Color? dividerColor, - Color? focusColor, - Color? hoverColor, Color? highlightColor, Color? splashColor, - InteractiveInkFeatureFactory? splashFactory, Color? selectedRowColor, Color? unselectedWidgetColor, Color? disabledColor, + Color? secondaryHeaderColor, + Color? backgroundColor, + Color? dialogBackgroundColor, + Color? indicatorColor, + Color? hintColor, + Color? errorColor, + Color? toggleableActiveColor, + // TYPOGRAPHY & ICONOGRAPHY + String? fontFamily, + Typography? typography, + TextTheme? textTheme, + TextTheme? primaryTextTheme, + IconThemeData? iconTheme, + IconThemeData? primaryIconTheme, + // COMPONENT THEMES + AppBarTheme? appBarTheme, + MaterialBannerThemeData? bannerTheme, + BottomAppBarTheme? bottomAppBarTheme, + BottomNavigationBarThemeData? bottomNavigationBarTheme, + BottomSheetThemeData? bottomSheetTheme, + ButtonBarThemeData? buttonBarTheme, + ButtonThemeData? buttonTheme, + CardTheme? cardTheme, + CheckboxThemeData? checkboxTheme, + ChipThemeData? chipTheme, + DataTableThemeData? dataTableTheme, + DialogTheme? dialogTheme, + DividerThemeData? dividerTheme, + DrawerThemeData? drawerTheme, + ElevatedButtonThemeData? elevatedButtonTheme, + FloatingActionButtonThemeData? floatingActionButtonTheme, + ListTileThemeData? listTileTheme, + NavigationBarThemeData? navigationBarTheme, + NavigationRailThemeData? navigationRailTheme, + OutlinedButtonThemeData? outlinedButtonTheme, + PopupMenuThemeData? popupMenuTheme, + ProgressIndicatorThemeData? progressIndicatorTheme, + RadioThemeData? radioTheme, + SliderThemeData? sliderTheme, + SnackBarThemeData? snackBarTheme, + SwitchThemeData? switchTheme, + TabBarTheme? tabBarTheme, + TextButtonThemeData? textButtonTheme, + TextSelectionThemeData? textSelectionTheme, + TimePickerThemeData? timePickerTheme, + ToggleButtonsThemeData? toggleButtonsTheme, + TooltipThemeData? tooltipTheme, + // DEPRECATED (newest deprecations at the bottom) @Deprecated( 'No longer used by the framework, please remove any reference to it. ' - 'This feature was deprecated after v2.3.0-0.2.pre.', + 'This feature was deprecated after v1.23.0-4.0.pre.', ) - Color? buttonColor, - ButtonThemeData? buttonTheme, - ToggleButtonsThemeData? toggleButtonsTheme, - Color? secondaryHeaderColor, + bool? useTextSelectionTheme, @Deprecated( 'Use TextSelectionThemeData.selectionColor instead. ' 'This feature was deprecated after v1.26.0-18.0.pre.', @@ -278,15 +323,20 @@ class ThemeData with Diagnosticable { 'This feature was deprecated after v1.26.0-18.0.pre.', ) Color? textSelectionHandleColor, - Color? backgroundColor, - Color? dialogBackgroundColor, - Color? indicatorColor, - Color? hintColor, - Color? errorColor, - Color? toggleableActiveColor, - String? fontFamily, - TextTheme? textTheme, - TextTheme? primaryTextTheme, + @Deprecated( + 'Use colorScheme.secondary instead. ' + 'For more information, consult the migration guide at ' + 'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. ' + 'This feature was deprecated after v2.3.0-0.1.pre.', + ) + Color? accentColor, + @Deprecated( + 'No longer used by the framework, please remove any reference to it. ' + 'For more information, consult the migration guide at ' + 'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. ' + 'This feature was deprecated after v2.3.0-0.1.pre.', + ) + Brightness? accentColorBrightness, @Deprecated( 'No longer used by the framework, please remove any reference to it. ' 'For more information, consult the migration guide at ' @@ -294,9 +344,6 @@ class ThemeData with Diagnosticable { 'This feature was deprecated after v2.3.0-0.1.pre.', ) TextTheme? accentTextTheme, - InputDecorationTheme? inputDecorationTheme, - IconThemeData? iconTheme, - IconThemeData? primaryIconTheme, @Deprecated( 'No longer used by the framework, please remove any reference to it. ' 'For more information, consult the migration guide at ' @@ -304,55 +351,16 @@ class ThemeData with Diagnosticable { 'This feature was deprecated after v2.3.0-0.1.pre.', ) IconThemeData? accentIconTheme, - SliderThemeData? sliderTheme, - TabBarTheme? tabBarTheme, - TooltipThemeData? tooltipTheme, - CardTheme? cardTheme, - ChipThemeData? chipTheme, - TargetPlatform? platform, - MaterialTapTargetSize? materialTapTargetSize, - bool? applyElevationOverlayColor, - PageTransitionsTheme? pageTransitionsTheme, - AppBarTheme? appBarTheme, - ScrollbarThemeData? scrollbarTheme, - BottomAppBarTheme? bottomAppBarTheme, - ColorScheme? colorScheme, - DialogTheme? dialogTheme, - FloatingActionButtonThemeData? floatingActionButtonTheme, - NavigationBarThemeData? navigationBarTheme, - NavigationRailThemeData? navigationRailTheme, - Typography? typography, - NoDefaultCupertinoThemeData? cupertinoOverrideTheme, - SnackBarThemeData? snackBarTheme, - BottomSheetThemeData? bottomSheetTheme, - PopupMenuThemeData? popupMenuTheme, - MaterialBannerThemeData? bannerTheme, - DividerThemeData? dividerTheme, - ButtonBarThemeData? buttonBarTheme, - BottomNavigationBarThemeData? bottomNavigationBarTheme, - TimePickerThemeData? timePickerTheme, - TextButtonThemeData? textButtonTheme, - ElevatedButtonThemeData? elevatedButtonTheme, - OutlinedButtonThemeData? outlinedButtonTheme, - TextSelectionThemeData? textSelectionTheme, - DataTableThemeData? dataTableTheme, - CheckboxThemeData? checkboxTheme, - RadioThemeData? radioTheme, - SwitchThemeData? switchTheme, - ProgressIndicatorThemeData? progressIndicatorTheme, - DrawerThemeData? drawerTheme, - ListTileThemeData? listTileTheme, + @Deprecated( + 'No longer used by the framework, please remove any reference to it. ' + 'This feature was deprecated after v2.3.0-0.2.pre.', + ) + Color? buttonColor, @Deprecated( 'This "fix" is now enabled by default. ' 'This feature was deprecated after v2.5.0-1.0.pre.', ) bool? fixTextFieldOutlineLabel, - @Deprecated( - 'No longer used by the framework, please remove any reference to it. ' - 'This feature was deprecated after v1.23.0-4.0.pre.', - ) - bool? useTextSelectionTheme, - AndroidOverscrollIndicator? androidOverscrollIndicator, }) { assert(colorScheme?.brightness == null || brightness == null || colorScheme!.brightness == brightness); final Brightness _brightness = brightness ?? colorScheme?.brightness ?? Brightness.light; @@ -493,88 +501,93 @@ class ThemeData with Diagnosticable { useTextSelectionTheme ??= true; return ThemeData.raw( + // GENERAL CONFIGURATION + androidOverscrollIndicator: androidOverscrollIndicator, + applyElevationOverlayColor: applyElevationOverlayColor, + cupertinoOverrideTheme: cupertinoOverrideTheme, + inputDecorationTheme: inputDecorationTheme, + materialTapTargetSize: materialTapTargetSize, + pageTransitionsTheme: pageTransitionsTheme, + platform: platform, + scrollbarTheme: scrollbarTheme, + splashFactory: splashFactory, visualDensity: visualDensity, + // COLOR + colorScheme: colorScheme, primaryColor: primaryColor, primaryColorBrightness: primaryColorBrightness, primaryColorLight: primaryColorLight, primaryColorDark: primaryColorDark, - accentColor: accentColor, - accentColorBrightness: accentColorBrightness, - canvasColor: canvasColor, + focusColor: focusColor, + hoverColor: hoverColor, shadowColor: shadowColor, + canvasColor: canvasColor, scaffoldBackgroundColor: scaffoldBackgroundColor, bottomAppBarColor: bottomAppBarColor, cardColor: cardColor, dividerColor: dividerColor, - focusColor: focusColor, - hoverColor: hoverColor, highlightColor: highlightColor, splashColor: splashColor, - splashFactory: splashFactory, selectedRowColor: selectedRowColor, unselectedWidgetColor: unselectedWidgetColor, disabledColor: disabledColor, - buttonTheme: buttonTheme, - buttonColor: buttonColor, - toggleButtonsTheme: toggleButtonsTheme, - toggleableActiveColor: toggleableActiveColor, secondaryHeaderColor: secondaryHeaderColor, - textSelectionColor: textSelectionColor, - cursorColor: cursorColor, - textSelectionHandleColor: textSelectionHandleColor, backgroundColor: backgroundColor, dialogBackgroundColor: dialogBackgroundColor, indicatorColor: indicatorColor, hintColor: hintColor, errorColor: errorColor, + toggleableActiveColor: toggleableActiveColor, + // TYPOGRAPHY & ICONOGRAPHY + typography: typography, textTheme: textTheme, primaryTextTheme: primaryTextTheme, - accentTextTheme: accentTextTheme, - inputDecorationTheme: inputDecorationTheme, iconTheme: iconTheme, primaryIconTheme: primaryIconTheme, - accentIconTheme: accentIconTheme, - sliderTheme: sliderTheme, - tabBarTheme: tabBarTheme, - tooltipTheme: tooltipTheme, - cardTheme: cardTheme, - chipTheme: chipTheme, - platform: platform, - materialTapTargetSize: materialTapTargetSize, - applyElevationOverlayColor: applyElevationOverlayColor, - pageTransitionsTheme: pageTransitionsTheme, + // COMPONENT THEMES appBarTheme: appBarTheme, - scrollbarTheme: scrollbarTheme, + bannerTheme: bannerTheme, bottomAppBarTheme: bottomAppBarTheme, - colorScheme: colorScheme, + bottomNavigationBarTheme: bottomNavigationBarTheme, + bottomSheetTheme: bottomSheetTheme, + buttonBarTheme: buttonBarTheme, + buttonTheme: buttonTheme, + cardTheme: cardTheme, + checkboxTheme: checkboxTheme, + chipTheme: chipTheme, + dataTableTheme: dataTableTheme, dialogTheme: dialogTheme, + dividerTheme: dividerTheme, + drawerTheme: drawerTheme, + elevatedButtonTheme: elevatedButtonTheme, floatingActionButtonTheme: floatingActionButtonTheme, + listTileTheme: listTileTheme, navigationBarTheme: navigationBarTheme, navigationRailTheme: navigationRailTheme, - typography: typography, - cupertinoOverrideTheme: cupertinoOverrideTheme, - snackBarTheme: snackBarTheme, - bottomSheetTheme: bottomSheetTheme, - popupMenuTheme: popupMenuTheme, - bannerTheme: bannerTheme, - dividerTheme: dividerTheme, - buttonBarTheme: buttonBarTheme, - bottomNavigationBarTheme: bottomNavigationBarTheme, - timePickerTheme: timePickerTheme, - textButtonTheme: textButtonTheme, - elevatedButtonTheme: elevatedButtonTheme, outlinedButtonTheme: outlinedButtonTheme, - textSelectionTheme: textSelectionTheme, - dataTableTheme: dataTableTheme, - checkboxTheme: checkboxTheme, - radioTheme: radioTheme, - switchTheme: switchTheme, + popupMenuTheme: popupMenuTheme, progressIndicatorTheme: progressIndicatorTheme, - drawerTheme: drawerTheme, - listTileTheme: listTileTheme, - fixTextFieldOutlineLabel: fixTextFieldOutlineLabel, + radioTheme: radioTheme, + sliderTheme: sliderTheme, + snackBarTheme: snackBarTheme, + switchTheme: switchTheme, + tabBarTheme: tabBarTheme, + textButtonTheme: textButtonTheme, + textSelectionTheme: textSelectionTheme, + timePickerTheme: timePickerTheme, + toggleButtonsTheme: toggleButtonsTheme, + tooltipTheme: tooltipTheme, + // DEPRECATED (newest deprecations at the bottom) useTextSelectionTheme: useTextSelectionTheme, - androidOverscrollIndicator: androidOverscrollIndicator, + textSelectionColor: textSelectionColor, + cursorColor: cursorColor, + textSelectionHandleColor: textSelectionHandleColor, + accentColor: accentColor, + accentColorBrightness: accentColorBrightness, + accentTextTheme: accentTextTheme, + accentIconTheme: accentIconTheme, + buttonColor: buttonColor, + fixTextFieldOutlineLabel: fixTextFieldOutlineLabel, ); } @@ -589,47 +602,91 @@ class ThemeData with Diagnosticable { // Warning: make sure these properties are in the exact same order as in // operator == and in the hashValues method and in the order of fields // in this class, and in the lerp() method. + // GENERAL CONFIGURATION + required this.androidOverscrollIndicator, + required this.applyElevationOverlayColor, + required this.cupertinoOverrideTheme, + required this.inputDecorationTheme, + required this.materialTapTargetSize, + required this.pageTransitionsTheme, + required this.platform, + required this.scrollbarTheme, + required this.splashFactory, required this.visualDensity, + // COLOR + // [colorScheme] is the preferred way to configure colors. The other color + // properties will gradually be phased out, see + // https://github.com/flutter/flutter/issues/91772. + required this.colorScheme, required this.primaryColor, required this.primaryColorBrightness, required this.primaryColorLight, required this.primaryColorDark, - required this.canvasColor, + required this.focusColor, + required this.hoverColor, required this.shadowColor, - @Deprecated( - 'Use colorScheme.secondary instead. ' - 'For more information, consult the migration guide at ' - 'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. ' - 'This feature was deprecated after v2.3.0-0.1.pre.', - ) - required this.accentColor, - @Deprecated( - 'No longer used by the framework, please remove any reference to it. ' - 'For more information, consult the migration guide at ' - 'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. ' - 'This feature was deprecated after v2.3.0-0.1.pre.', - ) - required this.accentColorBrightness, + required this.canvasColor, required this.scaffoldBackgroundColor, required this.bottomAppBarColor, required this.cardColor, required this.dividerColor, - required this.focusColor, - required this.hoverColor, required this.highlightColor, required this.splashColor, - required this.splashFactory, required this.selectedRowColor, required this.unselectedWidgetColor, required this.disabledColor, + required this.secondaryHeaderColor, + required this.backgroundColor, + required this.dialogBackgroundColor, + required this.indicatorColor, + required this.hintColor, + required this.errorColor, + required this.toggleableActiveColor, + // TYPOGRAPHY & ICONOGRAPHY + required this.typography, + required this.textTheme, + required this.primaryTextTheme, + required this.iconTheme, + required this.primaryIconTheme, + // COMPONENT THEMES + required this.appBarTheme, + required this.bannerTheme, + required this.bottomAppBarTheme, + required this.bottomNavigationBarTheme, + required this.bottomSheetTheme, + required this.buttonBarTheme, required this.buttonTheme, + required this.cardTheme, + required this.checkboxTheme, + required this.chipTheme, + required this.dataTableTheme, + required this.dialogTheme, + required this.dividerTheme, + required this.drawerTheme, + required this.elevatedButtonTheme, + required this.floatingActionButtonTheme, + required this.listTileTheme, + required this.navigationBarTheme, + required this.navigationRailTheme, + required this.outlinedButtonTheme, + required this.popupMenuTheme, + required this.progressIndicatorTheme, + required this.radioTheme, + required this.sliderTheme, + required this.snackBarTheme, + required this.switchTheme, + required this.tabBarTheme, + required this.textButtonTheme, + required this.textSelectionTheme, + required this.timePickerTheme, + required this.toggleButtonsTheme, + required this.tooltipTheme, + // DEPRECATED (newest deprecations at the bottom) @Deprecated( 'No longer used by the framework, please remove any reference to it. ' - 'This feature was deprecated after v2.3.0-0.2.pre.', + 'This feature was deprecated after v1.23.0-4.0.pre.', ) - required this.buttonColor, - required this.toggleButtonsTheme, - required this.secondaryHeaderColor, + required this.useTextSelectionTheme, @Deprecated( 'Use TextSelectionThemeData.selectionColor instead. ' 'This feature was deprecated after v1.26.0-18.0.pre.', @@ -645,14 +702,20 @@ class ThemeData with Diagnosticable { 'This feature was deprecated after v1.26.0-18.0.pre.', ) required this.textSelectionHandleColor, - required this.backgroundColor, - required this.dialogBackgroundColor, - required this.indicatorColor, - required this.hintColor, - required this.errorColor, - required this.toggleableActiveColor, - required this.textTheme, - required this.primaryTextTheme, + @Deprecated( + 'Use colorScheme.secondary instead. ' + 'For more information, consult the migration guide at ' + 'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. ' + 'This feature was deprecated after v2.3.0-0.1.pre.', + ) + required this.accentColor, + @Deprecated( + 'No longer used by the framework, please remove any reference to it. ' + 'For more information, consult the migration guide at ' + 'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. ' + 'This feature was deprecated after v2.3.0-0.1.pre.', + ) + required this.accentColorBrightness, @Deprecated( 'No longer used by the framework, please remove any reference to it. ' 'For more information, consult the migration guide at ' @@ -660,9 +723,6 @@ class ThemeData with Diagnosticable { 'This feature was deprecated after v2.3.0-0.1.pre.', ) required this.accentTextTheme, - required this.inputDecorationTheme, - required this.iconTheme, - required this.primaryIconTheme, @Deprecated( 'No longer used by the framework, please remove any reference to it. ' 'For more information, consult the migration guide at ' @@ -670,133 +730,101 @@ class ThemeData with Diagnosticable { 'This feature was deprecated after v2.3.0-0.1.pre.', ) required this.accentIconTheme, - required this.sliderTheme, - required this.tabBarTheme, - required this.tooltipTheme, - required this.cardTheme, - required this.chipTheme, - required this.platform, - required this.materialTapTargetSize, - required this.applyElevationOverlayColor, - required this.pageTransitionsTheme, - required this.appBarTheme, - required this.scrollbarTheme, - required this.bottomAppBarTheme, - required this.colorScheme, - required this.dialogTheme, - required this.floatingActionButtonTheme, - required this.navigationBarTheme, - required this.navigationRailTheme, - required this.typography, - required this.cupertinoOverrideTheme, - required this.snackBarTheme, - required this.bottomSheetTheme, - required this.popupMenuTheme, - required this.bannerTheme, - required this.dividerTheme, - required this.buttonBarTheme, - required this.bottomNavigationBarTheme, - required this.timePickerTheme, - required this.textButtonTheme, - required this.elevatedButtonTheme, - required this.outlinedButtonTheme, - required this.textSelectionTheme, - required this.dataTableTheme, - required this.checkboxTheme, - required this.radioTheme, - required this.switchTheme, - required this.progressIndicatorTheme, - required this.drawerTheme, - required this.listTileTheme, + @Deprecated( + 'No longer used by the framework, please remove any reference to it. ' + 'This feature was deprecated after v2.3.0-0.2.pre.', + ) + required this.buttonColor, @Deprecated( 'This "fix" is now enabled by default. ' 'This feature was deprecated after v2.5.0-1.0.pre.', ) required this.fixTextFieldOutlineLabel, - @Deprecated( - 'No longer used by the framework, please remove any reference to it. ' - 'This feature was deprecated after v1.23.0-4.0.pre.', - ) - required this.useTextSelectionTheme, - required this.androidOverscrollIndicator, - }) : assert(visualDensity != null), + }) : // GENERAL CONFIGURATION + assert(applyElevationOverlayColor != null), + assert(inputDecorationTheme != null), + assert(materialTapTargetSize != null), + assert(pageTransitionsTheme != null), + assert(platform != null), + assert(scrollbarTheme != null), + assert(splashFactory != null), + assert(visualDensity != null), + // COLOR + assert(colorScheme != null), assert(primaryColor != null), assert(primaryColorBrightness != null), assert(primaryColorLight != null), assert(primaryColorDark != null), - assert(accentColor != null), - assert(accentColorBrightness != null), - assert(canvasColor != null), + assert(focusColor != null), + assert(hoverColor != null), assert(shadowColor != null), + assert(canvasColor != null), assert(scaffoldBackgroundColor != null), assert(bottomAppBarColor != null), assert(cardColor != null), assert(dividerColor != null), - assert(focusColor != null), - assert(hoverColor != null), assert(highlightColor != null), assert(splashColor != null), - assert(splashFactory != null), assert(selectedRowColor != null), assert(unselectedWidgetColor != null), assert(disabledColor != null), - assert(toggleableActiveColor != null), - assert(buttonTheme != null), - assert(toggleButtonsTheme != null), assert(secondaryHeaderColor != null), - assert(textSelectionColor != null), - assert(cursorColor != null), - assert(textSelectionHandleColor != null), assert(backgroundColor != null), assert(dialogBackgroundColor != null), assert(indicatorColor != null), assert(hintColor != null), assert(errorColor != null), + assert(toggleableActiveColor != null), + // TYPOGRAPHY & ICONOGRAPHY + assert(typography != null), assert(textTheme != null), assert(primaryTextTheme != null), - assert(accentTextTheme != null), - assert(inputDecorationTheme != null), assert(iconTheme != null), assert(primaryIconTheme != null), - assert(accentIconTheme != null), - assert(sliderTheme != null), - assert(tabBarTheme != null), - assert(tooltipTheme != null), - assert(cardTheme != null), - assert(chipTheme != null), - assert(platform != null), - assert(materialTapTargetSize != null), - assert(pageTransitionsTheme != null), + // COMPONENT THEMES assert(appBarTheme != null), - assert(scrollbarTheme != null), + assert(bannerTheme != null), assert(bottomAppBarTheme != null), - assert(colorScheme != null), + assert(bottomNavigationBarTheme != null), + assert(bottomSheetTheme != null), + assert(buttonBarTheme != null), + assert(buttonTheme != null), + assert(cardTheme != null), + assert(checkboxTheme != null), + assert(chipTheme != null), + assert(dataTableTheme != null), assert(dialogTheme != null), + assert(dividerTheme != null), + assert(drawerTheme != null), + assert(elevatedButtonTheme != null), assert(floatingActionButtonTheme != null), + assert(listTileTheme != null), assert(navigationBarTheme != null), assert(navigationRailTheme != null), - assert(typography != null), - assert(snackBarTheme != null), - assert(bottomSheetTheme != null), - assert(popupMenuTheme != null), - assert(bannerTheme != null), - assert(dividerTheme != null), - assert(buttonBarTheme != null), - assert(bottomNavigationBarTheme != null), - assert(timePickerTheme != null), - assert(textButtonTheme != null), - assert(elevatedButtonTheme != null), assert(outlinedButtonTheme != null), - assert(textSelectionTheme != null), - assert(dataTableTheme != null), - assert(checkboxTheme != null), - assert(radioTheme != null), - assert(switchTheme != null), + assert(popupMenuTheme != null), assert(progressIndicatorTheme != null), - assert(drawerTheme != null), - assert(listTileTheme != null), - assert(fixTextFieldOutlineLabel != null), - assert(useTextSelectionTheme != null); + assert(radioTheme != null), + assert(sliderTheme != null), + assert(snackBarTheme != null), + assert(switchTheme != null), + assert(tabBarTheme != null), + assert(textButtonTheme != null), + assert(textSelectionTheme != null), + assert(timePickerTheme != null), + assert(toggleButtonsTheme != null), + assert(tooltipTheme != null), + // DEPRECATED (newest deprecations at the bottom) + assert(useTextSelectionTheme != null), + assert(textSelectionColor != null), + assert(cursorColor != null), + assert(textSelectionHandleColor != null), + assert(accentColor != null), + assert(accentColorBrightness != null), + assert(accentTextTheme != null), + assert(accentIconTheme != null), + assert(buttonColor != null), + assert(fixTextFieldOutlineLabel != null); /// Create a [ThemeData] based on the colors in the given [colorScheme] and /// text styles of the optional [textTheme]. @@ -830,8 +858,6 @@ class ThemeData with Diagnosticable { required ColorScheme colorScheme, TextTheme? textTheme, }) { - assert(colorScheme != null); - final bool isDark = colorScheme.brightness == Brightness.dark; // For surfaces that use primary color in light themes and surface color in dark @@ -839,6 +865,7 @@ class ThemeData with Diagnosticable { final Color onPrimarySurfaceColor = isDark ? colorScheme.onSurface : colorScheme.onPrimary; return ThemeData( + colorScheme: colorScheme, brightness: colorScheme.brightness, primaryColor: primarySurfaceColor, primaryColorBrightness: ThemeData.estimateBrightnessForColor(primarySurfaceColor), @@ -851,11 +878,10 @@ class ThemeData with Diagnosticable { dividerColor: colorScheme.onSurface.withOpacity(0.12), backgroundColor: colorScheme.background, dialogBackgroundColor: colorScheme.background, + indicatorColor: onPrimarySurfaceColor, errorColor: colorScheme.error, textTheme: textTheme, - indicatorColor: onPrimarySurfaceColor, applyElevationOverlayColor: isDark, - colorScheme: colorScheme, ); } @@ -882,10 +908,6 @@ class ThemeData with Diagnosticable { /// text geometry. factory ThemeData.fallback() => ThemeData.light(); - // Warning: make sure these properties are in the exact same order as in - // hashValues() and in the raw constructor and in the order of fields in - // the class and in the lerp() method. - /// The overall theme brightness. /// /// The default [TextStyle] color for the [textTheme] is black if the @@ -893,6 +915,130 @@ class ThemeData with Diagnosticable { /// theme is constructed with [Brightness.dark]. Brightness get brightness => colorScheme.brightness; + // Warning: make sure these properties are in the exact same order as in + // hashValues() and in the raw constructor and in the order of fields in + // the class and in the lerp() method. + + // GENERAL CONFIGURATION + + /// Specifies which overscroll indicator to use on [TargetPlatform.android]. + /// + /// When null, the default value of + /// [MaterialScrollBehavior.androidOverscrollIndicator] is + /// [AndroidOverscrollIndicator.glow]. + /// + /// See also: + /// + /// * [StretchingOverscrollIndicator], a material design edge effect + /// that transforms the contents of a scrollable when overscrolled. + /// * [GlowingOverscrollIndicator], an edge effect that paints a glow + /// over the contents of a scrollable when overscrolled. + final AndroidOverscrollIndicator? androidOverscrollIndicator; + + /// Apply a semi-transparent overlay color on Material surfaces to indicate + /// elevation for dark themes. + /// + /// Material drop shadows can be difficult to see in a dark theme, so the + /// elevation of a surface should be portrayed with an "overlay" in addition + /// to the shadow. As the elevation of the component increases, the + /// overlay increases in opacity. [applyElevationOverlayColor] turns the + /// application of this overlay on or off for dark themes. + /// + /// If true and [brightness] is [Brightness.dark], a + /// semi-transparent version of [ColorScheme.onSurface] will be + /// applied on top of [Material] widgets that have a [ColorScheme.surface] + /// color. The level of transparency is based on [Material.elevation] as + /// per the Material Dark theme specification. + /// + /// If false the surface color will be used unmodified. + /// + /// Defaults to false in order to maintain backwards compatibility with + /// apps that were built before the Material Dark theme specification + /// was published. New apps should set this to true for any themes + /// where [brightness] is [Brightness.dark]. + /// + /// See also: + /// + /// * [Material.elevation], which effects the level of transparency of the + /// overlay color. + /// * [ElevationOverlay.applyOverlay], which is used by [Material] to apply + /// the overlay color to its surface color. + /// * , which specifies how + /// the overlay should be applied. + final bool applyElevationOverlayColor; + + /// Components of the [CupertinoThemeData] to override from the Material + /// [ThemeData] adaptation. + /// + /// By default, [cupertinoOverrideTheme] is null and Cupertino widgets + /// descendant to the Material [Theme] will adhere to a [CupertinoTheme] + /// derived from the Material [ThemeData]. e.g. [ThemeData]'s [ColorScheme] + /// will also inform the [CupertinoThemeData]'s `primaryColor` etc. + /// + /// This cascading effect for individual attributes of the [CupertinoThemeData] + /// can be overridden using attributes of this [cupertinoOverrideTheme]. + final NoDefaultCupertinoThemeData? cupertinoOverrideTheme; + + /// The default [InputDecoration] values for [InputDecorator], [TextField], + /// and [TextFormField] are based on this theme. + /// + /// See [InputDecoration.applyDefaults]. + final InputDecorationTheme inputDecorationTheme; + + /// Configures the hit test size of certain Material widgets. + /// + /// Defaults to a [platform]-appropriate size: [MaterialTapTargetSize.padded] + /// on mobile platforms, [MaterialTapTargetSize.shrinkWrap] on desktop + /// platforms. + final MaterialTapTargetSize materialTapTargetSize; + + /// Default [MaterialPageRoute] transitions per [TargetPlatform]. + /// + /// [MaterialPageRoute.buildTransitions] delegates to a [platform] specific + /// [PageTransitionsBuilder]. If a matching builder is not found, a builder + /// whose platform is null is used. + final PageTransitionsTheme pageTransitionsTheme; + + /// The platform the material widgets should adapt to target. + /// + /// Defaults to the current platform, as exposed by [defaultTargetPlatform]. + /// This should be used in order to style UI elements according to platform + /// conventions. + /// + /// Widgets from the material library should use this getter (via [Theme.of]) + /// to determine the current platform for the purpose of emulating the + /// platform behavior (e.g. scrolling or haptic effects). Widgets and render + /// objects at lower layers that try to emulate the underlying platform + /// platform can depend on [defaultTargetPlatform] directly, or may require + /// that the target platform be provided as an argument. The + /// [dart:io.Platform] object should only be used directly when it's critical + /// to actually know the current platform, without any overrides possible (for + /// example, when a system API is about to be called). + /// + /// In a test environment, the platform returned is [TargetPlatform.android] + /// regardless of the host platform. (Android was chosen because the tests + /// were originally written assuming Android-like behavior, and we added + /// platform adaptations for other platforms later). Tests can check behavior + /// for other platforms by setting the [platform] of the [Theme] explicitly to + /// another [TargetPlatform] value, or by setting + /// [debugDefaultTargetPlatformOverride]. + /// + /// Determines the defaults for [typography] and [materialTapTargetSize]. + final TargetPlatform platform; + + /// A theme for customizing the colors, thickness, and shape of [Scrollbar]s. + final ScrollbarThemeData scrollbarTheme; + + /// Defines the appearance of ink splashes produces by [InkWell] + /// and [InkResponse]. + /// + /// See also: + /// + /// * [InkSplash.splashFactory], which defines the default splash. + /// * [InkRipple.splashFactory], which defines a splash that spreads out + /// more aggressively than the default. + final InteractiveInkFeatureFactory splashFactory; + /// The density value for specifying the compactness of various UI components. /// /// {@template flutter.material.themedata.visualDensity} @@ -922,6 +1068,18 @@ class ThemeData with Diagnosticable { /// {@endtemplate} final VisualDensity visualDensity; + // COLOR + + /// A set of twelve colors that can be used to configure the + /// color properties of most components. + /// + /// This property was added much later than the theme's set of highly + /// specific colors, like [cardColor], [buttonColor], [canvasColor] etc. + /// New components can be defined exclusively in terms of [colorScheme]. + /// Existing components will gradually migrate to it, to the extent + /// that is possible without significant backwards compatibility breaks. + final ColorScheme colorScheme; + /// The background color for major parts of the app (toolbars, tab bars, etc) /// /// The theme's [colorScheme] property contains [ColorScheme.primary], as @@ -940,8 +1098,12 @@ class ThemeData with Diagnosticable { /// A darker version of the [primaryColor]. final Color primaryColorDark; - /// The default color of [MaterialType.canvas] [Material]. - final Color canvasColor; + /// The focus color used indicate that a component has the input focus. + final Color focusColor; + + /// The hover color used to indicate when a pointer is hovering over a + /// component. + final Color hoverColor; /// The color that the [Material] widget uses to draw elevation shadows. /// @@ -954,6 +1116,247 @@ class ThemeData with Diagnosticable { /// overlay on or off for dark themes. final Color shadowColor; + /// The default color of [MaterialType.canvas] [Material]. + final Color canvasColor; + + /// The default color of the [Material] that underlies the [Scaffold]. The + /// background color for a typical material app or a page within the app. + final Color scaffoldBackgroundColor; + + /// The default color of the [BottomAppBar]. + /// + /// This can be overridden by specifying [BottomAppBar.color]. + final Color bottomAppBarColor; + + /// The color of [Material] when it is used as a [Card]. + final Color cardColor; + + /// The color of [Divider]s and [PopupMenuDivider]s, also used + /// between [ListTile]s, between rows in [DataTable]s, and so forth. + /// + /// To create an appropriate [BorderSide] that uses this color, consider + /// [Divider.createBorderSide]. + final Color dividerColor; + + /// The highlight color used during ink splash animations or to + /// indicate an item in a menu is selected. + final Color highlightColor; + + /// The color of ink splashes. + /// + /// See also: + /// * [splashFactory], which defines the appearance of the splash. + final Color splashColor; + + /// The color used to highlight selected rows. + final Color selectedRowColor; + + /// The color used for widgets in their inactive (but enabled) + /// state. For example, an unchecked checkbox. See also [disabledColor]. + final Color unselectedWidgetColor; + + /// The color used for widgets that are inoperative, regardless of + /// their state. For example, a disabled checkbox (which may be + /// checked or unchecked). + final Color disabledColor; + + /// The color of the header of a [PaginatedDataTable] when there are selected rows. + // According to the spec for data tables: + // https://material.io/archive/guidelines/components/data-tables.html#data-tables-tables-within-cards + // ...this should be the "50-value of secondary app color". + final Color secondaryHeaderColor; + + /// A color that contrasts with the [primaryColor], e.g. used as the + /// remaining part of a progress bar. + final Color backgroundColor; + + /// The background color of [Dialog] elements. + final Color dialogBackgroundColor; + + /// The color of the selected tab indicator in a tab bar. + final Color indicatorColor; + + /// The color to use for hint text or placeholder text, e.g. in + /// [TextField] fields. + final Color hintColor; + + /// The color to use for input validation errors, e.g. in [TextField] fields. + final Color errorColor; + + /// The color used to highlight the active states of toggleable widgets like + /// [Switch], [Radio], and [Checkbox]. + final Color toggleableActiveColor; + + // TYPOGRAPHY & ICONOGRAPHY + + /// The color and geometry [TextTheme] values used to configure [textTheme]. + /// + /// Defaults to a [platform]-appropriate typography. + final Typography typography; + + /// Text with a color that contrasts with the card and canvas colors. + final TextTheme textTheme; + + /// A text theme that contrasts with the primary color. + final TextTheme primaryTextTheme; + + /// An icon theme that contrasts with the card and canvas colors. + final IconThemeData iconTheme; + + /// An icon theme that contrasts with the primary color. + final IconThemeData primaryIconTheme; + + // COMPONENT THEMES + + /// A theme for customizing the color, elevation, brightness, iconTheme and + /// textTheme of [AppBar]s. + final AppBarTheme appBarTheme; + + /// A theme for customizing the color and text style of a [MaterialBanner]. + final MaterialBannerThemeData bannerTheme; + + /// A theme for customizing the shape, elevation, and color of a [BottomAppBar]. + final BottomAppBarTheme bottomAppBarTheme; + + /// A theme for customizing the appearance and layout of [BottomNavigationBar] + /// widgets. + final BottomNavigationBarThemeData bottomNavigationBarTheme; + + /// A theme for customizing the color, elevation, and shape of a bottom sheet. + final BottomSheetThemeData bottomSheetTheme; + + /// A theme for customizing the appearance and layout of [ButtonBar] widgets. + final ButtonBarThemeData buttonBarTheme; + + /// Defines the default configuration of button widgets, like [RaisedButton] + /// and [FlatButton]. + final ButtonThemeData buttonTheme; + + /// The colors and styles used to render [Card]. + /// + /// This is the value returned from [CardTheme.of]. + final CardTheme cardTheme; + + /// A theme for customizing the appearance and layout of [Checkbox] widgets. + final CheckboxThemeData checkboxTheme; + + /// The colors and styles used to render [Chip]s. + /// + /// This is the value returned from [ChipTheme.of]. + final ChipThemeData chipTheme; + + /// A theme for customizing the appearance and layout of [DataTable] + /// widgets. + final DataTableThemeData dataTableTheme; + + /// A theme for customizing the shape of a dialog. + final DialogTheme dialogTheme; + + /// A theme for customizing the color, thickness, and indents of [Divider]s, + /// [VerticalDivider]s, etc. + final DividerThemeData dividerTheme; + + /// A theme for customizing the appearance and layout of [Drawer] widgets. + final DrawerThemeData drawerTheme; + + /// A theme for customizing the appearance and internal layout of + /// [ElevatedButton]s. + final ElevatedButtonThemeData elevatedButtonTheme; + + /// A theme for customizing the shape, elevation, and color of a + /// [FloatingActionButton]. + final FloatingActionButtonThemeData floatingActionButtonTheme; + + /// A theme for customizing the appearance of [ListTile] widgets. + final ListTileThemeData listTileTheme; + + /// A theme for customizing the background color, text style, and icon themes + /// of a [NavigationBar]. + final NavigationBarThemeData navigationBarTheme; + + /// A theme for customizing the background color, elevation, text style, and + /// icon themes of a [NavigationRail]. + final NavigationRailThemeData navigationRailTheme; + + /// A theme for customizing the appearance and internal layout of + /// [OutlinedButton]s. + final OutlinedButtonThemeData outlinedButtonTheme; + + /// A theme for customizing the color, shape, elevation, and text style of + /// popup menus. + final PopupMenuThemeData popupMenuTheme; + + /// A theme for customizing the appearance and layout of [ProgressIndicator] widgets. + final ProgressIndicatorThemeData progressIndicatorTheme; + + /// A theme for customizing the appearance and layout of [Radio] widgets. + final RadioThemeData radioTheme; + + /// The colors and shapes used to render [Slider]. + /// + /// This is the value returned from [SliderTheme.of]. + final SliderThemeData sliderTheme; + + /// A theme for customizing colors, shape, elevation, and behavior of a [SnackBar]. + final SnackBarThemeData snackBarTheme; + + /// A theme for customizing the appearance and layout of [Switch] widgets. + final SwitchThemeData switchTheme; + + /// A theme for customizing the size, shape, and color of the tab bar indicator. + final TabBarTheme tabBarTheme; + + /// A theme for customizing the appearance and internal layout of + /// [TextButton]s. + final TextButtonThemeData textButtonTheme; + + /// A theme for customizing the appearance and layout of [TextField] widgets. + final TextSelectionThemeData textSelectionTheme; + + /// A theme for customizing the appearance and layout of time picker widgets. + final TimePickerThemeData timePickerTheme; + + /// Defines the default configuration of [ToggleButtons] widgets. + final ToggleButtonsThemeData toggleButtonsTheme; + + /// A theme for customizing the visual properties of [Tooltip]s. + /// + /// This is the value returned from [TooltipTheme.of]. + final TooltipThemeData tooltipTheme; + + // DEPRECATED (newest deprecations at the bottom) + + /// A temporary flag that was used to opt-in to the new [TextSelectionTheme] + /// during the migration to this new theme. That migration is now complete + /// and this flag is not longer used by the framework. Please remove any + /// reference to this property, as it will be removed in future releases. + @Deprecated( + 'No longer used by the framework, please remove any reference to it. ' + 'This feature was deprecated after v1.23.0-4.0.pre.', + ) + final bool useTextSelectionTheme; + + /// The color of text selections in text fields, such as [TextField]. + @Deprecated( + 'Use TextSelectionThemeData.selectionColor instead. ' + 'This feature was deprecated after v1.26.0-18.0.pre.', + ) + final Color textSelectionColor; + + /// The color of cursors in Material-style text fields, such as [TextField]. + @Deprecated( + 'Use TextSelectionThemeData.cursorColor instead. ' + 'This feature was deprecated after v1.26.0-18.0.pre.', + ) + final Color cursorColor; + + /// The color of the handles used to adjust what part of the text is currently selected. + @Deprecated( + 'Use TextSelectionThemeData.selectionHandleColor instead. ' + 'This feature was deprecated after v1.26.0-18.0.pre.', + ) + final Color textSelectionHandleColor; + /// Obsolete property that was originally used as the foreground /// color for widgets (knobs, text, overscroll edge effect, etc). /// @@ -989,129 +1392,6 @@ class ThemeData with Diagnosticable { ) final Brightness accentColorBrightness; - /// The default color of the [Material] that underlies the [Scaffold]. The - /// background color for a typical material app or a page within the app. - final Color scaffoldBackgroundColor; - - /// The default color of the [BottomAppBar]. - /// - /// This can be overridden by specifying [BottomAppBar.color]. - final Color bottomAppBarColor; - - /// The color of [Material] when it is used as a [Card]. - final Color cardColor; - - /// The color of [Divider]s and [PopupMenuDivider]s, also used - /// between [ListTile]s, between rows in [DataTable]s, and so forth. - /// - /// To create an appropriate [BorderSide] that uses this color, consider - /// [Divider.createBorderSide]. - final Color dividerColor; - - /// The focus color used indicate that a component has the input focus. - final Color focusColor; - - /// The hover color used to indicate when a pointer is hovering over a - /// component. - final Color hoverColor; - - /// The highlight color used during ink splash animations or to - /// indicate an item in a menu is selected. - final Color highlightColor; - - /// The color of ink splashes. See [InkWell]. - final Color splashColor; - - /// Defines the appearance of ink splashes produces by [InkWell] - /// and [InkResponse]. - /// - /// See also: - /// - /// * [InkSplash.splashFactory], which defines the default splash. - /// * [InkRipple.splashFactory], which defines a splash that spreads out - /// more aggressively than the default. - final InteractiveInkFeatureFactory splashFactory; - - /// The color used to highlight selected rows. - final Color selectedRowColor; - - /// The color used for widgets in their inactive (but enabled) - /// state. For example, an unchecked checkbox. See also [disabledColor]. - final Color unselectedWidgetColor; - - /// The color used for widgets that are inoperative, regardless of - /// their state. For example, a disabled checkbox (which may be - /// checked or unchecked). - final Color disabledColor; - - /// Defines the default configuration of button widgets, like [RaisedButton] - /// and [FlatButton]. - final ButtonThemeData buttonTheme; - - /// Defines the default configuration of [ToggleButtons] widgets. - final ToggleButtonsThemeData toggleButtonsTheme; - - /// The default fill color of the [Material] used in [RaisedButton]s. - @Deprecated( - 'No longer used by the framework, please remove any reference to it. ' - 'This feature was deprecated after v2.3.0-0.2.pre.', - ) - final Color buttonColor; - - /// The color of the header of a [PaginatedDataTable] when there are selected rows. - // According to the spec for data tables: - // https://material.io/archive/guidelines/components/data-tables.html#data-tables-tables-within-cards - // ...this should be the "50-value of secondary app color". - final Color secondaryHeaderColor; - - /// The color of text selections in text fields, such as [TextField]. - @Deprecated( - 'Use TextSelectionThemeData.selectionColor instead. ' - 'This feature was deprecated after v1.26.0-18.0.pre.', - ) - final Color textSelectionColor; - - /// The color of cursors in Material-style text fields, such as [TextField]. - @Deprecated( - 'Use TextSelectionThemeData.cursorColor instead. ' - 'This feature was deprecated after v1.26.0-18.0.pre.', - ) - final Color cursorColor; - - /// The color of the handles used to adjust what part of the text is currently selected. - @Deprecated( - 'Use TextSelectionThemeData.selectionHandleColor instead. ' - 'This feature was deprecated after v1.26.0-18.0.pre.', - ) - final Color textSelectionHandleColor; - - /// A color that contrasts with the [primaryColor], e.g. used as the - /// remaining part of a progress bar. - final Color backgroundColor; - - /// The background color of [Dialog] elements. - final Color dialogBackgroundColor; - - /// The color of the selected tab indicator in a tab bar. - final Color indicatorColor; - - /// The color to use for hint text or placeholder text, e.g. in - /// [TextField] fields. - final Color hintColor; - - /// The color to use for input validation errors, e.g. in [TextField] fields. - final Color errorColor; - - /// The color used to highlight the active states of toggleable widgets like - /// [Switch], [Radio], and [Checkbox]. - final Color toggleableActiveColor; - - /// Text with a color that contrasts with the card and canvas colors. - final TextTheme textTheme; - - /// A text theme that contrasts with the primary color. - final TextTheme primaryTextTheme; - /// Obsolete property that was originally used when a [TextTheme] /// that contrasted well with the [accentColor] was needed. /// @@ -1135,18 +1415,6 @@ class ThemeData with Diagnosticable { ) final TextTheme accentTextTheme; - /// The default [InputDecoration] values for [InputDecorator], [TextField], - /// and [TextFormField] are based on this theme. - /// - /// See [InputDecoration.applyDefaults]. - final InputDecorationTheme inputDecorationTheme; - - /// An icon theme that contrasts with the card and canvas colors. - final IconThemeData iconTheme; - - /// An icon theme that contrasts with the primary color. - final IconThemeData primaryIconTheme; - /// Obsolete property that was originally used when an [IconTheme] /// that contrasted well with the [accentColor] was needed. /// @@ -1161,209 +1429,12 @@ class ThemeData with Diagnosticable { ) final IconThemeData accentIconTheme; - /// The colors and shapes used to render [Slider]. - /// - /// This is the value returned from [SliderTheme.of]. - final SliderThemeData sliderTheme; - - /// A theme for customizing the size, shape, and color of the tab bar indicator. - final TabBarTheme tabBarTheme; - - /// A theme for customizing the visual properties of [Tooltip]s. - /// - /// This is the value returned from [TooltipTheme.of]. - final TooltipThemeData tooltipTheme; - - /// The colors and styles used to render [Card]. - /// - /// This is the value returned from [CardTheme.of]. - final CardTheme cardTheme; - - /// The colors and styles used to render [Chip]s. - /// - /// This is the value returned from [ChipTheme.of]. - final ChipThemeData chipTheme; - - /// The platform the material widgets should adapt to target. - /// - /// Defaults to the current platform, as exposed by [defaultTargetPlatform]. - /// This should be used in order to style UI elements according to platform - /// conventions. - /// - /// Widgets from the material library should use this getter (via [Theme.of]) - /// to determine the current platform for the purpose of emulating the - /// platform behavior (e.g. scrolling or haptic effects). Widgets and render - /// objects at lower layers that try to emulate the underlying platform - /// platform can depend on [defaultTargetPlatform] directly, or may require - /// that the target platform be provided as an argument. The - /// [dart:io.Platform] object should only be used directly when it's critical - /// to actually know the current platform, without any overrides possible (for - /// example, when a system API is about to be called). - /// - /// In a test environment, the platform returned is [TargetPlatform.android] - /// regardless of the host platform. (Android was chosen because the tests - /// were originally written assuming Android-like behavior, and we added - /// platform adaptations for other platforms later). Tests can check behavior - /// for other platforms by setting the [platform] of the [Theme] explicitly to - /// another [TargetPlatform] value, or by setting - /// [debugDefaultTargetPlatformOverride]. - final TargetPlatform platform; - - /// Configures the hit test size of certain Material widgets. - final MaterialTapTargetSize materialTapTargetSize; - - /// Apply a semi-transparent overlay color on Material surfaces to indicate - /// elevation for dark themes. - /// - /// Material drop shadows can be difficult to see in a dark theme, so the - /// elevation of a surface should be portrayed with an "overlay" in addition - /// to the shadow. As the elevation of the component increases, the - /// overlay increases in opacity. [applyElevationOverlayColor] turns the - /// application of this overlay on or off for dark themes. - /// - /// If true and [brightness] is [Brightness.dark], a - /// semi-transparent version of [ColorScheme.onSurface] will be - /// applied on top of [Material] widgets that have a [ColorScheme.surface] - /// color. The level of transparency is based on [Material.elevation] as - /// per the Material Dark theme specification. - /// - /// If false the surface color will be used unmodified. - /// - /// Defaults to false in order to maintain backwards compatibility with - /// apps that were built before the Material Dark theme specification - /// was published. New apps should set this to true for any themes - /// where [brightness] is [Brightness.dark]. - /// - /// See also: - /// - /// * [Material.elevation], which effects the level of transparency of the - /// overlay color. - /// * [ElevationOverlay.applyOverlay], which is used by [Material] to apply - /// the overlay color to its surface color. - /// * , which specifies how - /// the overlay should be applied. - final bool applyElevationOverlayColor; - - /// Default [MaterialPageRoute] transitions per [TargetPlatform]. - /// - /// [MaterialPageRoute.buildTransitions] delegates to a [platform] specific - /// [PageTransitionsBuilder]. If a matching builder is not found, a builder - /// whose platform is null is used. - final PageTransitionsTheme pageTransitionsTheme; - - /// A theme for customizing the color, elevation, brightness, iconTheme and - /// textTheme of [AppBar]s. - final AppBarTheme appBarTheme; - - /// A theme for customizing the colors, thickness, and shape of [Scrollbar]s. - final ScrollbarThemeData scrollbarTheme; - - /// A theme for customizing the shape, elevation, and color of a [BottomAppBar]. - final BottomAppBarTheme bottomAppBarTheme; - - /// A set of thirteen colors that can be used to configure the - /// color properties of most components. - /// - /// This property was added much later than the theme's set of highly - /// specific colors, like [cardColor], [buttonColor], [canvasColor] etc. - /// New components can be defined exclusively in terms of [colorScheme]. - /// Existing components will gradually migrate to it, to the extent - /// that is possible without significant backwards compatibility breaks. - final ColorScheme colorScheme; - - /// A theme for customizing colors, shape, elevation, and behavior of a [SnackBar]. - final SnackBarThemeData snackBarTheme; - - /// A theme for customizing the shape of a dialog. - final DialogTheme dialogTheme; - - /// A theme for customizing the shape, elevation, and color of a - /// [FloatingActionButton]. - final FloatingActionButtonThemeData floatingActionButtonTheme; - - /// A theme for customizing the background color, text style, and icon themes - /// of a [NavigationBar]. - final NavigationBarThemeData navigationBarTheme; - - /// A theme for customizing the background color, elevation, text style, and - /// icon themes of a [NavigationRail]. - final NavigationRailThemeData navigationRailTheme; - - /// The color and geometry [TextTheme] values used to configure [textTheme]. - final Typography typography; - - /// Components of the [CupertinoThemeData] to override from the Material - /// [ThemeData] adaptation. - /// - /// By default, [cupertinoOverrideTheme] is null and Cupertino widgets - /// descendant to the Material [Theme] will adhere to a [CupertinoTheme] - /// derived from the Material [ThemeData]. e.g. [ThemeData]'s [ColorScheme] - /// will also inform the [CupertinoThemeData]'s `primaryColor` etc. - /// - /// This cascading effect for individual attributes of the [CupertinoThemeData] - /// can be overridden using attributes of this [cupertinoOverrideTheme]. - final NoDefaultCupertinoThemeData? cupertinoOverrideTheme; - - /// A theme for customizing the color, elevation, and shape of a bottom sheet. - final BottomSheetThemeData bottomSheetTheme; - - /// A theme for customizing the color, shape, elevation, and text style of - /// popup menus. - final PopupMenuThemeData popupMenuTheme; - - /// A theme for customizing the color and text style of a [MaterialBanner]. - final MaterialBannerThemeData bannerTheme; - - /// A theme for customizing the color, thickness, and indents of [Divider]s, - /// [VerticalDivider]s, etc. - final DividerThemeData dividerTheme; - - /// A theme for customizing the appearance and layout of [ButtonBar] widgets. - final ButtonBarThemeData buttonBarTheme; - - /// A theme for customizing the appearance and layout of [BottomNavigationBar] - /// widgets. - final BottomNavigationBarThemeData bottomNavigationBarTheme; - - /// A theme for customizing the appearance and layout of time picker widgets. - final TimePickerThemeData timePickerTheme; - - /// A theme for customizing the appearance and internal layout of - /// [TextButton]s. - final TextButtonThemeData textButtonTheme; - - /// A theme for customizing the appearance and internal layout of - /// [ElevatedButton]s. - final ElevatedButtonThemeData elevatedButtonTheme; - - /// A theme for customizing the appearance and internal layout of - /// [OutlinedButton]s. - final OutlinedButtonThemeData outlinedButtonTheme; - - /// A theme for customizing the appearance and layout of [TextField] widgets. - final TextSelectionThemeData textSelectionTheme; - - /// A theme for customizing the appearance and layout of [DataTable] - /// widgets. - final DataTableThemeData dataTableTheme; - - /// A theme for customizing the appearance and layout of [Checkbox] widgets. - final CheckboxThemeData checkboxTheme; - - /// A theme for customizing the appearance and layout of [Radio] widgets. - final RadioThemeData radioTheme; - - /// A theme for customizing the appearance and layout of [Switch] widgets. - final SwitchThemeData switchTheme; - - /// A theme for customizing the appearance and layout of [ProgressIndicator] widgets. - final ProgressIndicatorThemeData progressIndicatorTheme; - - /// A theme for customizing the appearance and layout of [Drawer] widgets. - final DrawerThemeData drawerTheme; - - /// A theme for customizing the appearance of [ListTile] widgets. - final ListTileThemeData listTileTheme; + /// The default fill color of the [Material] used in [RaisedButton]s. + @Deprecated( + 'No longer used by the framework, please remove any reference to it. ' + 'This feature was deprecated after v2.3.0-0.2.pre.', + ) + final Color buttonColor; /// An obsolete flag to allow apps to opt-out of a /// [small fix](https://github.com/flutter/flutter/issues/54028) for the Y @@ -1379,76 +1450,96 @@ class ThemeData with Diagnosticable { ) final bool fixTextFieldOutlineLabel; - /// A temporary flag that was used to opt-in to the new [TextSelectionTheme] - /// during the migration to this new theme. That migration is now complete - /// and this flag is not longer used by the framework. Please remove any - /// reference to this property, as it will be removed in future releases. - @Deprecated( - 'No longer used by the framework, please remove any reference to it. ' - 'This feature was deprecated after v1.23.0-4.0.pre.', - ) - final bool useTextSelectionTheme; - - /// Specifies which overscroll indicator to use on [TargetPlatform.android]. - /// - /// When null, the default value of - /// [MaterialScrollBehavior.androidOverscrollIndicator] is - /// [AndroidOverscrollIndicator.glow]. - /// - /// See also: - /// - /// * [StretchingOverscrollIndicator], a material design edge effect - /// that transforms the contents of a scrollable when overscrolled. - /// * [GlowingOverscrollIndicator], an edge effect that paints a glow - /// over the contents of a scrollable when overscrolled. - final AndroidOverscrollIndicator? androidOverscrollIndicator; - /// Creates a copy of this theme but with the given fields replaced with the new values. /// /// The [brightness] value is applied to the [colorScheme]. ThemeData copyWith({ - Brightness? brightness, + // GENERAL CONFIGURATION + AndroidOverscrollIndicator? androidOverscrollIndicator, + bool? applyElevationOverlayColor, + NoDefaultCupertinoThemeData? cupertinoOverrideTheme, + InputDecorationTheme? inputDecorationTheme, + MaterialTapTargetSize? materialTapTargetSize, + PageTransitionsTheme? pageTransitionsTheme, + TargetPlatform? platform, + ScrollbarThemeData? scrollbarTheme, + InteractiveInkFeatureFactory? splashFactory, VisualDensity? visualDensity, + // COLOR + // [colorScheme] is the preferred way to configure colors. The other color + // properties will gradually be phased out, see + // https://github.com/flutter/flutter/issues/91772. + ColorScheme? colorScheme, + Brightness? brightness, Color? primaryColor, Brightness? primaryColorBrightness, Color? primaryColorLight, Color? primaryColorDark, - @Deprecated( - 'No longer used by the framework, please remove any reference to it. ' - 'For more information, consult the migration guide at ' - 'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. ' - 'This feature was deprecated after v2.3.0-0.1.pre.', - ) - Color? accentColor, - @Deprecated( - 'No longer used by the framework, please remove any reference to it. ' - 'For more information, consult the migration guide at ' - 'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. ' - 'This feature was deprecated after v2.3.0-0.1.pre.', - ) - Brightness? accentColorBrightness, - Color? canvasColor, + Color? focusColor, + Color? hoverColor, Color? shadowColor, + Color? canvasColor, Color? scaffoldBackgroundColor, Color? bottomAppBarColor, Color? cardColor, Color? dividerColor, - Color? focusColor, - Color? hoverColor, Color? highlightColor, Color? splashColor, - InteractiveInkFeatureFactory? splashFactory, Color? selectedRowColor, Color? unselectedWidgetColor, Color? disabledColor, + Color? secondaryHeaderColor, + Color? backgroundColor, + Color? dialogBackgroundColor, + Color? indicatorColor, + Color? hintColor, + Color? errorColor, + Color? toggleableActiveColor, + // TYPOGRAPHY & ICONOGRAPHY + Typography? typography, + TextTheme? textTheme, + TextTheme? primaryTextTheme, + IconThemeData? iconTheme, + IconThemeData? primaryIconTheme, + // COMPONENT THEMES + AppBarTheme? appBarTheme, + MaterialBannerThemeData? bannerTheme, + BottomAppBarTheme? bottomAppBarTheme, + BottomNavigationBarThemeData? bottomNavigationBarTheme, + BottomSheetThemeData? bottomSheetTheme, + ButtonBarThemeData? buttonBarTheme, ButtonThemeData? buttonTheme, + CardTheme? cardTheme, + CheckboxThemeData? checkboxTheme, + ChipThemeData? chipTheme, + DataTableThemeData? dataTableTheme, + DialogTheme? dialogTheme, + DividerThemeData? dividerTheme, + DrawerThemeData? drawerTheme, + ElevatedButtonThemeData? elevatedButtonTheme, + FloatingActionButtonThemeData? floatingActionButtonTheme, + ListTileThemeData? listTileTheme, + NavigationBarThemeData? navigationBarTheme, + NavigationRailThemeData? navigationRailTheme, + OutlinedButtonThemeData? outlinedButtonTheme, + PopupMenuThemeData? popupMenuTheme, + ProgressIndicatorThemeData? progressIndicatorTheme, + RadioThemeData? radioTheme, + SliderThemeData? sliderTheme, + SnackBarThemeData? snackBarTheme, + SwitchThemeData? switchTheme, + TabBarTheme? tabBarTheme, + TextButtonThemeData? textButtonTheme, + TextSelectionThemeData? textSelectionTheme, + TimePickerThemeData? timePickerTheme, ToggleButtonsThemeData? toggleButtonsTheme, + TooltipThemeData? tooltipTheme, + // DEPRECATED (newest deprecations at the bottom) @Deprecated( 'No longer used by the framework, please remove any reference to it. ' - 'This feature was deprecated after v2.3.0-0.2.pre.', + 'This feature was deprecated after v1.23.0-4.0.pre.', ) - Color? buttonColor, - Color? secondaryHeaderColor, + bool? useTextSelectionTheme, @Deprecated( 'Use TextSelectionThemeData.selectionColor instead. ' 'This feature was deprecated after v1.26.0-18.0.pre.', @@ -1464,14 +1555,20 @@ class ThemeData with Diagnosticable { 'This feature was deprecated after v1.26.0-18.0.pre.', ) Color? textSelectionHandleColor, - Color? backgroundColor, - Color? dialogBackgroundColor, - Color? indicatorColor, - Color? hintColor, - Color? errorColor, - Color? toggleableActiveColor, - TextTheme? textTheme, - TextTheme? primaryTextTheme, + @Deprecated( + 'No longer used by the framework, please remove any reference to it. ' + 'For more information, consult the migration guide at ' + 'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. ' + 'This feature was deprecated after v2.3.0-0.1.pre.', + ) + Color? accentColor, + @Deprecated( + 'No longer used by the framework, please remove any reference to it. ' + 'For more information, consult the migration guide at ' + 'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. ' + 'This feature was deprecated after v2.3.0-0.1.pre.', + ) + Brightness? accentColorBrightness, @Deprecated( 'No longer used by the framework, please remove any reference to it. ' 'For more information, consult the migration guide at ' @@ -1479,9 +1576,6 @@ class ThemeData with Diagnosticable { 'This feature was deprecated after v2.3.0-0.1.pre.', ) TextTheme? accentTextTheme, - InputDecorationTheme? inputDecorationTheme, - IconThemeData? iconTheme, - IconThemeData? primaryIconTheme, @Deprecated( 'No longer used by the framework, please remove any reference to it. ' 'For more information, consult the migration guide at ' @@ -1489,140 +1583,106 @@ class ThemeData with Diagnosticable { 'This feature was deprecated after v2.3.0-0.1.pre.', ) IconThemeData? accentIconTheme, - SliderThemeData? sliderTheme, - TabBarTheme? tabBarTheme, - TooltipThemeData? tooltipTheme, - CardTheme? cardTheme, - ChipThemeData? chipTheme, - TargetPlatform? platform, - MaterialTapTargetSize? materialTapTargetSize, - bool? applyElevationOverlayColor, - PageTransitionsTheme? pageTransitionsTheme, - AppBarTheme? appBarTheme, - ScrollbarThemeData? scrollbarTheme, - BottomAppBarTheme? bottomAppBarTheme, - ColorScheme? colorScheme, - DialogTheme? dialogTheme, - FloatingActionButtonThemeData? floatingActionButtonTheme, - NavigationBarThemeData? navigationBarTheme, - NavigationRailThemeData? navigationRailTheme, - Typography? typography, - NoDefaultCupertinoThemeData? cupertinoOverrideTheme, - SnackBarThemeData? snackBarTheme, - BottomSheetThemeData? bottomSheetTheme, - PopupMenuThemeData? popupMenuTheme, - MaterialBannerThemeData? bannerTheme, - DividerThemeData? dividerTheme, - ButtonBarThemeData? buttonBarTheme, - BottomNavigationBarThemeData? bottomNavigationBarTheme, - TimePickerThemeData? timePickerTheme, - TextButtonThemeData? textButtonTheme, - ElevatedButtonThemeData? elevatedButtonTheme, - OutlinedButtonThemeData? outlinedButtonTheme, - TextSelectionThemeData? textSelectionTheme, - DataTableThemeData? dataTableTheme, - CheckboxThemeData? checkboxTheme, - RadioThemeData? radioTheme, - SwitchThemeData? switchTheme, - ProgressIndicatorThemeData? progressIndicatorTheme, - DrawerThemeData? drawerTheme, - ListTileThemeData? listTileTheme, + @Deprecated( + 'No longer used by the framework, please remove any reference to it. ' + 'This feature was deprecated after v2.3.0-0.2.pre.', + ) + Color? buttonColor, @Deprecated( 'This "fix" is now enabled by default. ' 'This feature was deprecated after v2.5.0-1.0.pre.', ) bool? fixTextFieldOutlineLabel, - @Deprecated( - 'No longer used by the framework, please remove any reference to it. ' - 'This feature was deprecated after v1.23.0-4.0.pre.', - ) - bool? useTextSelectionTheme, - AndroidOverscrollIndicator? androidOverscrollIndicator, }) { cupertinoOverrideTheme = cupertinoOverrideTheme?.noDefault(); return ThemeData.raw( + // GENERAL CONFIGURATION + androidOverscrollIndicator: androidOverscrollIndicator ?? this.androidOverscrollIndicator, + applyElevationOverlayColor: applyElevationOverlayColor ?? this.applyElevationOverlayColor, + cupertinoOverrideTheme: cupertinoOverrideTheme ?? this.cupertinoOverrideTheme, + inputDecorationTheme: inputDecorationTheme ?? this.inputDecorationTheme, + materialTapTargetSize: materialTapTargetSize ?? this.materialTapTargetSize, + pageTransitionsTheme: pageTransitionsTheme ?? this.pageTransitionsTheme, + platform: platform ?? this.platform, + scrollbarTheme: scrollbarTheme ?? this.scrollbarTheme, + splashFactory: splashFactory ?? this.splashFactory, visualDensity: visualDensity ?? this.visualDensity, + // COLOR + colorScheme: (colorScheme ?? this.colorScheme).copyWith(brightness: brightness), primaryColor: primaryColor ?? this.primaryColor, primaryColorBrightness: primaryColorBrightness ?? this.primaryColorBrightness, primaryColorLight: primaryColorLight ?? this.primaryColorLight, primaryColorDark: primaryColorDark ?? this.primaryColorDark, - accentColor: accentColor ?? this.accentColor, - accentColorBrightness: accentColorBrightness ?? this.accentColorBrightness, - canvasColor: canvasColor ?? this.canvasColor, + focusColor: focusColor ?? this.focusColor, + hoverColor: hoverColor ?? this.hoverColor, shadowColor: shadowColor ?? this.shadowColor, + canvasColor: canvasColor ?? this.canvasColor, scaffoldBackgroundColor: scaffoldBackgroundColor ?? this.scaffoldBackgroundColor, bottomAppBarColor: bottomAppBarColor ?? this.bottomAppBarColor, cardColor: cardColor ?? this.cardColor, dividerColor: dividerColor ?? this.dividerColor, - focusColor: focusColor ?? this.focusColor, - hoverColor: hoverColor ?? this.hoverColor, highlightColor: highlightColor ?? this.highlightColor, splashColor: splashColor ?? this.splashColor, - splashFactory: splashFactory ?? this.splashFactory, selectedRowColor: selectedRowColor ?? this.selectedRowColor, unselectedWidgetColor: unselectedWidgetColor ?? this.unselectedWidgetColor, disabledColor: disabledColor ?? this.disabledColor, - buttonColor: buttonColor ?? this.buttonColor, - buttonTheme: buttonTheme ?? this.buttonTheme, - toggleButtonsTheme: toggleButtonsTheme ?? this.toggleButtonsTheme, secondaryHeaderColor: secondaryHeaderColor ?? this.secondaryHeaderColor, - textSelectionColor: textSelectionColor ?? this.textSelectionColor, - cursorColor: cursorColor ?? this.cursorColor, - textSelectionHandleColor: textSelectionHandleColor ?? this.textSelectionHandleColor, backgroundColor: backgroundColor ?? this.backgroundColor, dialogBackgroundColor: dialogBackgroundColor ?? this.dialogBackgroundColor, indicatorColor: indicatorColor ?? this.indicatorColor, hintColor: hintColor ?? this.hintColor, errorColor: errorColor ?? this.errorColor, toggleableActiveColor: toggleableActiveColor ?? this.toggleableActiveColor, + // TYPOGRAPHY & ICONOGRAPHY + typography: typography ?? this.typography, textTheme: textTheme ?? this.textTheme, primaryTextTheme: primaryTextTheme ?? this.primaryTextTheme, - accentTextTheme: accentTextTheme ?? this.accentTextTheme, - inputDecorationTheme: inputDecorationTheme ?? this.inputDecorationTheme, iconTheme: iconTheme ?? this.iconTheme, primaryIconTheme: primaryIconTheme ?? this.primaryIconTheme, - accentIconTheme: accentIconTheme ?? this.accentIconTheme, - sliderTheme: sliderTheme ?? this.sliderTheme, - tabBarTheme: tabBarTheme ?? this.tabBarTheme, - tooltipTheme: tooltipTheme ?? this.tooltipTheme, - cardTheme: cardTheme ?? this.cardTheme, - chipTheme: chipTheme ?? this.chipTheme, - platform: platform ?? this.platform, - materialTapTargetSize: materialTapTargetSize ?? this.materialTapTargetSize, - applyElevationOverlayColor: applyElevationOverlayColor ?? this.applyElevationOverlayColor, - pageTransitionsTheme: pageTransitionsTheme ?? this.pageTransitionsTheme, + // COMPONENT THEMES appBarTheme: appBarTheme ?? this.appBarTheme, - scrollbarTheme: scrollbarTheme ?? this.scrollbarTheme, + bannerTheme: bannerTheme ?? this.bannerTheme, bottomAppBarTheme: bottomAppBarTheme ?? this.bottomAppBarTheme, - colorScheme: (colorScheme ?? this.colorScheme).copyWith(brightness: brightness), + bottomNavigationBarTheme: bottomNavigationBarTheme ?? this.bottomNavigationBarTheme, + bottomSheetTheme: bottomSheetTheme ?? this.bottomSheetTheme, + buttonBarTheme: buttonBarTheme ?? this.buttonBarTheme, + buttonTheme: buttonTheme ?? this.buttonTheme, + cardTheme: cardTheme ?? this.cardTheme, + checkboxTheme: checkboxTheme ?? this.checkboxTheme, + chipTheme: chipTheme ?? this.chipTheme, + dataTableTheme: dataTableTheme ?? this.dataTableTheme, dialogTheme: dialogTheme ?? this.dialogTheme, + dividerTheme: dividerTheme ?? this.dividerTheme, + drawerTheme: drawerTheme ?? this.drawerTheme, + elevatedButtonTheme: elevatedButtonTheme ?? this.elevatedButtonTheme, floatingActionButtonTheme: floatingActionButtonTheme ?? this.floatingActionButtonTheme, + listTileTheme: listTileTheme ?? this.listTileTheme, navigationBarTheme: navigationBarTheme ?? this.navigationBarTheme, navigationRailTheme: navigationRailTheme ?? this.navigationRailTheme, - typography: typography ?? this.typography, - cupertinoOverrideTheme: cupertinoOverrideTheme ?? this.cupertinoOverrideTheme, - snackBarTheme: snackBarTheme ?? this.snackBarTheme, - bottomSheetTheme: bottomSheetTheme ?? this.bottomSheetTheme, - popupMenuTheme: popupMenuTheme ?? this.popupMenuTheme, - bannerTheme: bannerTheme ?? this.bannerTheme, - dividerTheme: dividerTheme ?? this.dividerTheme, - buttonBarTheme: buttonBarTheme ?? this.buttonBarTheme, - bottomNavigationBarTheme: bottomNavigationBarTheme ?? this.bottomNavigationBarTheme, - timePickerTheme: timePickerTheme ?? this.timePickerTheme, - textButtonTheme: textButtonTheme ?? this.textButtonTheme, - elevatedButtonTheme: elevatedButtonTheme ?? this.elevatedButtonTheme, outlinedButtonTheme: outlinedButtonTheme ?? this.outlinedButtonTheme, - textSelectionTheme: textSelectionTheme ?? this.textSelectionTheme, - dataTableTheme: dataTableTheme ?? this.dataTableTheme, - checkboxTheme: checkboxTheme ?? this.checkboxTheme, - radioTheme: radioTheme ?? this.radioTheme, - switchTheme: switchTheme ?? this.switchTheme, + popupMenuTheme: popupMenuTheme ?? this.popupMenuTheme, progressIndicatorTheme: progressIndicatorTheme ?? this.progressIndicatorTheme, - drawerTheme: drawerTheme ?? this.drawerTheme, - listTileTheme: listTileTheme ?? this.listTileTheme, - fixTextFieldOutlineLabel: fixTextFieldOutlineLabel ?? this.fixTextFieldOutlineLabel, + radioTheme: radioTheme ?? this.radioTheme, + sliderTheme: sliderTheme ?? this.sliderTheme, + snackBarTheme: snackBarTheme ?? this.snackBarTheme, + switchTheme: switchTheme ?? this.switchTheme, + tabBarTheme: tabBarTheme ?? this.tabBarTheme, + textButtonTheme: textButtonTheme ?? this.textButtonTheme, + textSelectionTheme: textSelectionTheme ?? this.textSelectionTheme, + timePickerTheme: timePickerTheme ?? this.timePickerTheme, + toggleButtonsTheme: toggleButtonsTheme ?? this.toggleButtonsTheme, + tooltipTheme: tooltipTheme ?? this.tooltipTheme, + // DEPRECATED (newest deprecations at the bottom) useTextSelectionTheme: useTextSelectionTheme ?? this.useTextSelectionTheme, - androidOverscrollIndicator: androidOverscrollIndicator ?? this.androidOverscrollIndicator, + textSelectionColor: textSelectionColor ?? this.textSelectionColor, + cursorColor: cursorColor ?? this.cursorColor, + textSelectionHandleColor: textSelectionHandleColor ?? this.textSelectionHandleColor, + accentColor: accentColor ?? this.accentColor, + accentColorBrightness: accentColorBrightness ?? this.accentColorBrightness, + accentTextTheme: accentTextTheme ?? this.accentTextTheme, + accentIconTheme: accentIconTheme ?? this.accentIconTheme, + buttonColor: buttonColor ?? this.buttonColor, + fixTextFieldOutlineLabel: fixTextFieldOutlineLabel ?? this.fixTextFieldOutlineLabel, ); } @@ -1704,88 +1764,93 @@ class ThemeData with Diagnosticable { // hashValues() and in the raw constructor and in the order of fields in // the class and in the lerp() method. return ThemeData.raw( + // GENERAL CONFIGURATION + androidOverscrollIndicator:t < 0.5 ? a.androidOverscrollIndicator : b.androidOverscrollIndicator, + applyElevationOverlayColor:t < 0.5 ? a.applyElevationOverlayColor : b.applyElevationOverlayColor, + cupertinoOverrideTheme:t < 0.5 ? a.cupertinoOverrideTheme : b.cupertinoOverrideTheme, + inputDecorationTheme:t < 0.5 ? a.inputDecorationTheme : b.inputDecorationTheme, + materialTapTargetSize:t < 0.5 ? a.materialTapTargetSize : b.materialTapTargetSize, + pageTransitionsTheme:t < 0.5 ? a.pageTransitionsTheme : b.pageTransitionsTheme, + platform: t < 0.5 ? a.platform : b.platform, + scrollbarTheme: ScrollbarThemeData.lerp(a.scrollbarTheme, b.scrollbarTheme, t), + splashFactory: t < 0.5 ? a.splashFactory : b.splashFactory, visualDensity: VisualDensity.lerp(a.visualDensity, b.visualDensity, t), + // COLOR + colorScheme: ColorScheme.lerp(a.colorScheme, b.colorScheme, t), primaryColor: Color.lerp(a.primaryColor, b.primaryColor, t)!, primaryColorBrightness: t < 0.5 ? a.primaryColorBrightness : b.primaryColorBrightness, primaryColorLight: Color.lerp(a.primaryColorLight, b.primaryColorLight, t)!, primaryColorDark: Color.lerp(a.primaryColorDark, b.primaryColorDark, t)!, - canvasColor: Color.lerp(a.canvasColor, b.canvasColor, t)!, + focusColor: Color.lerp(a.focusColor, b.focusColor, t)!, + hoverColor: Color.lerp(a.hoverColor, b.hoverColor, t)!, shadowColor: Color.lerp(a.shadowColor, b.shadowColor, t)!, - accentColor: Color.lerp(a.accentColor, b.accentColor, t)!, - accentColorBrightness: t < 0.5 ? a.accentColorBrightness : b.accentColorBrightness, + canvasColor: Color.lerp(a.canvasColor, b.canvasColor, t)!, scaffoldBackgroundColor: Color.lerp(a.scaffoldBackgroundColor, b.scaffoldBackgroundColor, t)!, bottomAppBarColor: Color.lerp(a.bottomAppBarColor, b.bottomAppBarColor, t)!, cardColor: Color.lerp(a.cardColor, b.cardColor, t)!, dividerColor: Color.lerp(a.dividerColor, b.dividerColor, t)!, - focusColor: Color.lerp(a.focusColor, b.focusColor, t)!, - hoverColor: Color.lerp(a.hoverColor, b.hoverColor, t)!, highlightColor: Color.lerp(a.highlightColor, b.highlightColor, t)!, splashColor: Color.lerp(a.splashColor, b.splashColor, t)!, - splashFactory: t < 0.5 ? a.splashFactory : b.splashFactory, selectedRowColor: Color.lerp(a.selectedRowColor, b.selectedRowColor, t)!, unselectedWidgetColor: Color.lerp(a.unselectedWidgetColor, b.unselectedWidgetColor, t)!, disabledColor: Color.lerp(a.disabledColor, b.disabledColor, t)!, - buttonTheme: t < 0.5 ? a.buttonTheme : b.buttonTheme, - buttonColor: Color.lerp(a.buttonColor, b.buttonColor, t)!, - toggleButtonsTheme: ToggleButtonsThemeData.lerp(a.toggleButtonsTheme, b.toggleButtonsTheme, t)!, secondaryHeaderColor: Color.lerp(a.secondaryHeaderColor, b.secondaryHeaderColor, t)!, - textSelectionColor: Color.lerp(a.textSelectionColor, b.textSelectionColor, t)!, - cursorColor: Color.lerp(a.cursorColor, b.cursorColor, t)!, - textSelectionHandleColor: Color.lerp(a.textSelectionHandleColor, b.textSelectionHandleColor, t)!, backgroundColor: Color.lerp(a.backgroundColor, b.backgroundColor, t)!, dialogBackgroundColor: Color.lerp(a.dialogBackgroundColor, b.dialogBackgroundColor, t)!, indicatorColor: Color.lerp(a.indicatorColor, b.indicatorColor, t)!, hintColor: Color.lerp(a.hintColor, b.hintColor, t)!, errorColor: Color.lerp(a.errorColor, b.errorColor, t)!, toggleableActiveColor: Color.lerp(a.toggleableActiveColor, b.toggleableActiveColor, t)!, + // TYPOGRAPHY & ICONOGRAPHY + typography: Typography.lerp(a.typography, b.typography, t), textTheme: TextTheme.lerp(a.textTheme, b.textTheme, t), primaryTextTheme: TextTheme.lerp(a.primaryTextTheme, b.primaryTextTheme, t), - accentTextTheme: TextTheme.lerp(a.accentTextTheme, b.accentTextTheme, t), - inputDecorationTheme: t < 0.5 ? a.inputDecorationTheme : b.inputDecorationTheme, iconTheme: IconThemeData.lerp(a.iconTheme, b.iconTheme, t), primaryIconTheme: IconThemeData.lerp(a.primaryIconTheme, b.primaryIconTheme, t), - accentIconTheme: IconThemeData.lerp(a.accentIconTheme, b.accentIconTheme, t), - sliderTheme: SliderThemeData.lerp(a.sliderTheme, b.sliderTheme, t), - tabBarTheme: TabBarTheme.lerp(a.tabBarTheme, b.tabBarTheme, t), - tooltipTheme: TooltipThemeData.lerp(a.tooltipTheme, b.tooltipTheme, t)!, - cardTheme: CardTheme.lerp(a.cardTheme, b.cardTheme, t), - chipTheme: ChipThemeData.lerp(a.chipTheme, b.chipTheme, t)!, - platform: t < 0.5 ? a.platform : b.platform, - materialTapTargetSize: t < 0.5 ? a.materialTapTargetSize : b.materialTapTargetSize, - applyElevationOverlayColor: t < 0.5 ? a.applyElevationOverlayColor : b.applyElevationOverlayColor, - pageTransitionsTheme: t < 0.5 ? a.pageTransitionsTheme : b.pageTransitionsTheme, + // COMPONENT THEMES appBarTheme: AppBarTheme.lerp(a.appBarTheme, b.appBarTheme, t), - scrollbarTheme: ScrollbarThemeData.lerp(a.scrollbarTheme, b.scrollbarTheme, t), + bannerTheme: MaterialBannerThemeData.lerp(a.bannerTheme, b.bannerTheme, t), bottomAppBarTheme: BottomAppBarTheme.lerp(a.bottomAppBarTheme, b.bottomAppBarTheme, t), - colorScheme: ColorScheme.lerp(a.colorScheme, b.colorScheme, t), + bottomNavigationBarTheme: BottomNavigationBarThemeData.lerp(a.bottomNavigationBarTheme, b.bottomNavigationBarTheme, t), + bottomSheetTheme: BottomSheetThemeData.lerp(a.bottomSheetTheme, b.bottomSheetTheme, t)!, + buttonBarTheme: ButtonBarThemeData.lerp(a.buttonBarTheme, b.buttonBarTheme, t)!, + buttonTheme: t < 0.5 ? a.buttonTheme : b.buttonTheme, + cardTheme: CardTheme.lerp(a.cardTheme, b.cardTheme, t), + checkboxTheme: CheckboxThemeData.lerp(a.checkboxTheme, b.checkboxTheme, t), + chipTheme: ChipThemeData.lerp(a.chipTheme, b.chipTheme, t)!, + dataTableTheme: DataTableThemeData.lerp(a.dataTableTheme, b.dataTableTheme, t), dialogTheme: DialogTheme.lerp(a.dialogTheme, b.dialogTheme, t), + dividerTheme: DividerThemeData.lerp(a.dividerTheme, b.dividerTheme, t), + drawerTheme: DrawerThemeData.lerp(a.drawerTheme, b.drawerTheme, t)!, + elevatedButtonTheme: ElevatedButtonThemeData.lerp(a.elevatedButtonTheme, b.elevatedButtonTheme, t)!, floatingActionButtonTheme: FloatingActionButtonThemeData.lerp(a.floatingActionButtonTheme, b.floatingActionButtonTheme, t)!, + listTileTheme: ListTileThemeData.lerp(a.listTileTheme, b.listTileTheme, t)!, navigationBarTheme: NavigationBarThemeData.lerp(a.navigationBarTheme, b.navigationBarTheme, t)!, navigationRailTheme: NavigationRailThemeData.lerp(a.navigationRailTheme, b.navigationRailTheme, t)!, - typography: Typography.lerp(a.typography, b.typography, t), - cupertinoOverrideTheme: t < 0.5 ? a.cupertinoOverrideTheme : b.cupertinoOverrideTheme, - snackBarTheme: SnackBarThemeData.lerp(a.snackBarTheme, b.snackBarTheme, t), - bottomSheetTheme: BottomSheetThemeData.lerp(a.bottomSheetTheme, b.bottomSheetTheme, t)!, - popupMenuTheme: PopupMenuThemeData.lerp(a.popupMenuTheme, b.popupMenuTheme, t)!, - bannerTheme: MaterialBannerThemeData.lerp(a.bannerTheme, b.bannerTheme, t), - dividerTheme: DividerThemeData.lerp(a.dividerTheme, b.dividerTheme, t), - buttonBarTheme: ButtonBarThemeData.lerp(a.buttonBarTheme, b.buttonBarTheme, t)!, - bottomNavigationBarTheme: BottomNavigationBarThemeData.lerp(a.bottomNavigationBarTheme, b.bottomNavigationBarTheme, t), - timePickerTheme: TimePickerThemeData.lerp(a.timePickerTheme, b.timePickerTheme, t), - textButtonTheme: TextButtonThemeData.lerp(a.textButtonTheme, b.textButtonTheme, t)!, - elevatedButtonTheme: ElevatedButtonThemeData.lerp(a.elevatedButtonTheme, b.elevatedButtonTheme, t)!, outlinedButtonTheme: OutlinedButtonThemeData.lerp(a.outlinedButtonTheme, b.outlinedButtonTheme, t)!, - textSelectionTheme: TextSelectionThemeData.lerp(a.textSelectionTheme, b.textSelectionTheme, t)!, - dataTableTheme: DataTableThemeData.lerp(a.dataTableTheme, b.dataTableTheme, t), - checkboxTheme: CheckboxThemeData.lerp(a.checkboxTheme, b.checkboxTheme, t), - radioTheme: RadioThemeData.lerp(a.radioTheme, b.radioTheme, t), - switchTheme: SwitchThemeData.lerp(a.switchTheme, b.switchTheme, t), + popupMenuTheme: PopupMenuThemeData.lerp(a.popupMenuTheme, b.popupMenuTheme, t)!, progressIndicatorTheme: ProgressIndicatorThemeData.lerp(a.progressIndicatorTheme, b.progressIndicatorTheme, t)!, - drawerTheme: DrawerThemeData.lerp(a.drawerTheme, b.drawerTheme, t)!, - listTileTheme: ListTileThemeData.lerp(a.listTileTheme, b.listTileTheme, t)!, - fixTextFieldOutlineLabel: t < 0.5 ? a.fixTextFieldOutlineLabel : b.fixTextFieldOutlineLabel, + radioTheme: RadioThemeData.lerp(a.radioTheme, b.radioTheme, t), + sliderTheme: SliderThemeData.lerp(a.sliderTheme, b.sliderTheme, t), + snackBarTheme: SnackBarThemeData.lerp(a.snackBarTheme, b.snackBarTheme, t), + switchTheme: SwitchThemeData.lerp(a.switchTheme, b.switchTheme, t), + tabBarTheme: TabBarTheme.lerp(a.tabBarTheme, b.tabBarTheme, t), + textButtonTheme: TextButtonThemeData.lerp(a.textButtonTheme, b.textButtonTheme, t)!, + textSelectionTheme: TextSelectionThemeData.lerp(a.textSelectionTheme, b.textSelectionTheme, t)!, + timePickerTheme: TimePickerThemeData.lerp(a.timePickerTheme, b.timePickerTheme, t), + toggleButtonsTheme: ToggleButtonsThemeData.lerp(a.toggleButtonsTheme, b.toggleButtonsTheme, t)!, + tooltipTheme: TooltipThemeData.lerp(a.tooltipTheme, b.tooltipTheme, t)!, + // DEPRECATED (newest deprecations at the bottom) useTextSelectionTheme: t < 0.5 ? a.useTextSelectionTheme : b.useTextSelectionTheme, - androidOverscrollIndicator: t < 0.5 ? a.androidOverscrollIndicator : b.androidOverscrollIndicator, + textSelectionColor: Color.lerp(a.textSelectionColor, b.textSelectionColor, t)!, + cursorColor: Color.lerp(a.cursorColor, b.cursorColor, t)!, + textSelectionHandleColor: Color.lerp(a.textSelectionHandleColor, b.textSelectionHandleColor, t)!, + accentColor: Color.lerp(a.accentColor, b.accentColor, t)!, + accentColorBrightness: t < 0.5 ? a.accentColorBrightness : b.accentColorBrightness, + accentTextTheme: TextTheme.lerp(a.accentTextTheme, b.accentTextTheme, t), + accentIconTheme: IconThemeData.lerp(a.accentIconTheme, b.accentIconTheme, t), + buttonColor: Color.lerp(a.buttonColor, b.buttonColor, t)!, + fixTextFieldOutlineLabel: t < 0.5 ? a.fixTextFieldOutlineLabel : b.fixTextFieldOutlineLabel, ); } @@ -1796,89 +1861,94 @@ class ThemeData with Diagnosticable { // Warning: make sure these properties are in the exact same order as in // hashValues() and in the raw constructor and in the order of fields in // the class and in the lerp() method. - return other is ThemeData - && other.visualDensity == visualDensity - && other.primaryColor == primaryColor - && other.primaryColorBrightness == primaryColorBrightness - && other.primaryColorLight == primaryColorLight - && other.primaryColorDark == primaryColorDark - && other.canvasColor == canvasColor - && other.shadowColor == shadowColor - && other.accentColor == accentColor - && other.accentColorBrightness == accentColorBrightness - && other.scaffoldBackgroundColor == scaffoldBackgroundColor - && other.bottomAppBarColor == bottomAppBarColor - && other.cardColor == cardColor - && other.dividerColor == dividerColor - && other.focusColor == focusColor - && other.hoverColor == hoverColor - && other.highlightColor == highlightColor - && other.splashColor == splashColor - && other.splashFactory == splashFactory - && other.selectedRowColor == selectedRowColor - && other.unselectedWidgetColor == unselectedWidgetColor - && other.disabledColor == disabledColor - && other.buttonTheme == buttonTheme - && other.buttonColor == buttonColor - && other.toggleButtonsTheme == toggleButtonsTheme - && other.secondaryHeaderColor == secondaryHeaderColor - && other.textSelectionColor == textSelectionColor - && other.cursorColor == cursorColor - && other.textSelectionHandleColor == textSelectionHandleColor - && other.backgroundColor == backgroundColor - && other.dialogBackgroundColor == dialogBackgroundColor - && other.indicatorColor == indicatorColor - && other.hintColor == hintColor - && other.errorColor == errorColor - && other.toggleableActiveColor == toggleableActiveColor - && other.textTheme == textTheme - && other.primaryTextTheme == primaryTextTheme - && other.accentTextTheme == accentTextTheme - && other.inputDecorationTheme == inputDecorationTheme - && other.iconTheme == iconTheme - && other.primaryIconTheme == primaryIconTheme - && other.accentIconTheme == accentIconTheme - && other.sliderTheme == sliderTheme - && other.tabBarTheme == tabBarTheme - && other.tooltipTheme == tooltipTheme - && other.cardTheme == cardTheme - && other.chipTheme == chipTheme - && other.platform == platform - && other.materialTapTargetSize == materialTapTargetSize - && other.applyElevationOverlayColor == applyElevationOverlayColor - && other.pageTransitionsTheme == pageTransitionsTheme - && other.appBarTheme == appBarTheme - && other.scrollbarTheme == scrollbarTheme - && other.bottomAppBarTheme == bottomAppBarTheme - && other.colorScheme == colorScheme - && other.dialogTheme == dialogTheme - && other.floatingActionButtonTheme == floatingActionButtonTheme - && other.navigationBarTheme == navigationBarTheme - && other.navigationRailTheme == navigationRailTheme - && other.typography == typography - && other.cupertinoOverrideTheme == cupertinoOverrideTheme - && other.snackBarTheme == snackBarTheme - && other.bottomSheetTheme == bottomSheetTheme - && other.popupMenuTheme == popupMenuTheme - && other.bannerTheme == bannerTheme - && other.dividerTheme == dividerTheme - && other.buttonBarTheme == buttonBarTheme - && other.bottomNavigationBarTheme == bottomNavigationBarTheme - && other.timePickerTheme == timePickerTheme - && other.textButtonTheme == textButtonTheme - && other.elevatedButtonTheme == elevatedButtonTheme - && other.outlinedButtonTheme == outlinedButtonTheme - && other.textSelectionTheme == textSelectionTheme - && other.dataTableTheme == dataTableTheme - && other.checkboxTheme == checkboxTheme - && other.radioTheme == radioTheme - && other.switchTheme == switchTheme - && other.progressIndicatorTheme == progressIndicatorTheme - && other.drawerTheme == drawerTheme - && other.listTileTheme == listTileTheme - && other.fixTextFieldOutlineLabel == fixTextFieldOutlineLabel - && other.useTextSelectionTheme == useTextSelectionTheme - && other.androidOverscrollIndicator == androidOverscrollIndicator; + return other is ThemeData && + // GENERAL CONFIGURATION + other.androidOverscrollIndicator == androidOverscrollIndicator && + other.applyElevationOverlayColor == applyElevationOverlayColor && + other.cupertinoOverrideTheme == cupertinoOverrideTheme && + other.inputDecorationTheme == inputDecorationTheme && + other.materialTapTargetSize == materialTapTargetSize && + other.pageTransitionsTheme == pageTransitionsTheme && + other.platform == platform && + other.scrollbarTheme == scrollbarTheme && + other.splashFactory == splashFactory && + other.visualDensity == visualDensity && + // COLOR + other.colorScheme == colorScheme && + other.primaryColor == primaryColor && + other.primaryColorBrightness == primaryColorBrightness && + other.primaryColorLight == primaryColorLight && + other.primaryColorDark == primaryColorDark && + other.focusColor == focusColor && + other.hoverColor == hoverColor && + other.shadowColor == shadowColor && + other.canvasColor == canvasColor && + other.scaffoldBackgroundColor == scaffoldBackgroundColor && + other.bottomAppBarColor == bottomAppBarColor && + other.cardColor == cardColor && + other.dividerColor == dividerColor && + other.highlightColor == highlightColor && + other.splashColor == splashColor && + other.selectedRowColor == selectedRowColor && + other.unselectedWidgetColor == unselectedWidgetColor && + other.disabledColor == disabledColor && + other.secondaryHeaderColor == secondaryHeaderColor && + other.backgroundColor == backgroundColor && + other.dialogBackgroundColor == dialogBackgroundColor && + other.indicatorColor == indicatorColor && + other.hintColor == hintColor && + other.errorColor == errorColor && + other.toggleableActiveColor == toggleableActiveColor && + // TYPOGRAPHY & ICONOGRAPHY + other.typography == typography && + other.textTheme == textTheme && + other.primaryTextTheme == primaryTextTheme && + other.iconTheme == iconTheme && + other.primaryIconTheme == primaryIconTheme && + // COMPONENT THEMES + other.appBarTheme == appBarTheme && + other.bannerTheme == bannerTheme && + other.bottomAppBarTheme == bottomAppBarTheme && + other.bottomNavigationBarTheme == bottomNavigationBarTheme && + other.bottomSheetTheme == bottomSheetTheme && + other.buttonBarTheme == buttonBarTheme && + other.buttonTheme == buttonTheme && + other.cardTheme == cardTheme && + other.checkboxTheme == checkboxTheme && + other.chipTheme == chipTheme && + other.dataTableTheme == dataTableTheme && + other.dialogTheme == dialogTheme && + other.dividerTheme == dividerTheme && + other.drawerTheme == drawerTheme && + other.elevatedButtonTheme == elevatedButtonTheme && + other.floatingActionButtonTheme == floatingActionButtonTheme && + other.listTileTheme == listTileTheme && + other.navigationBarTheme == navigationBarTheme && + other.navigationRailTheme == navigationRailTheme && + other.outlinedButtonTheme == outlinedButtonTheme && + other.popupMenuTheme == popupMenuTheme && + other.progressIndicatorTheme == progressIndicatorTheme && + other.radioTheme == radioTheme && + other.sliderTheme == sliderTheme && + other.snackBarTheme == snackBarTheme && + other.switchTheme == switchTheme && + other.tabBarTheme == tabBarTheme && + other.textButtonTheme == textButtonTheme && + other.textSelectionTheme == textSelectionTheme && + other.timePickerTheme == timePickerTheme && + other.toggleButtonsTheme == toggleButtonsTheme && + other.tooltipTheme == tooltipTheme && + // DEPRECATED (newest deprecations at the bottom) + other.useTextSelectionTheme == useTextSelectionTheme && + other.textSelectionColor == textSelectionColor && + other.cursorColor == cursorColor && + other.textSelectionHandleColor == textSelectionHandleColor && + other.accentColor == accentColor && + other.accentColorBrightness == accentColorBrightness && + other.accentTextTheme == accentTextTheme && + other.accentIconTheme == accentIconTheme && + other.buttonColor == buttonColor && + other.fixTextFieldOutlineLabel == fixTextFieldOutlineLabel; } @override @@ -1887,88 +1957,93 @@ class ThemeData with Diagnosticable { // are in the exact same order as in operator == and in the raw constructor // and in the order of fields in the class and in the lerp() method. final List values = [ + // 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, ]; return hashList(values); } @@ -1977,88 +2052,93 @@ class ThemeData with Diagnosticable { void debugFillProperties(DiagnosticPropertiesBuilder properties) { super.debugFillProperties(properties); final ThemeData defaultData = ThemeData.fallback(); - properties.add(DiagnosticsProperty('visualDensity', visualDensity, level: DiagnosticLevel.debug)); + // GENERAL CONFIGURATION + properties.add(EnumProperty('androidOverscrollIndicator', androidOverscrollIndicator, defaultValue: null, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('applyElevationOverlayColor', applyElevationOverlayColor, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('cupertinoOverrideTheme', cupertinoOverrideTheme, defaultValue: defaultData.cupertinoOverrideTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('inputDecorationTheme', inputDecorationTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('materialTapTargetSize', materialTapTargetSize, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('pageTransitionsTheme', pageTransitionsTheme, level: DiagnosticLevel.debug)); properties.add(EnumProperty('platform', platform, defaultValue: defaultTargetPlatform, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('scrollbarTheme', scrollbarTheme, defaultValue: defaultData.scrollbarTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('splashFactory', splashFactory, defaultValue: defaultData.splashFactory, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('visualDensity', visualDensity, defaultValue: defaultData.visualDensity, level: DiagnosticLevel.debug)); + // COLORS + properties.add(DiagnosticsProperty('colorScheme', colorScheme, defaultValue: defaultData.colorScheme, level: DiagnosticLevel.debug)); properties.add(ColorProperty('primaryColor', primaryColor, defaultValue: defaultData.primaryColor, level: DiagnosticLevel.debug)); properties.add(EnumProperty('primaryColorBrightness', primaryColorBrightness, defaultValue: defaultData.primaryColorBrightness, level: DiagnosticLevel.debug)); properties.add(ColorProperty('primaryColorLight', primaryColorLight, defaultValue: defaultData.primaryColorLight, level: DiagnosticLevel.debug)); properties.add(ColorProperty('primaryColorDark', primaryColorDark, defaultValue: defaultData.primaryColorDark, level: DiagnosticLevel.debug)); - properties.add(ColorProperty('accentColor', accentColor, defaultValue: defaultData.accentColor, level: DiagnosticLevel.debug)); - properties.add(EnumProperty('accentColorBrightness', accentColorBrightness, defaultValue: defaultData.accentColorBrightness, level: DiagnosticLevel.debug)); - properties.add(ColorProperty('canvasColor', canvasColor, defaultValue: defaultData.canvasColor, level: DiagnosticLevel.debug)); + properties.add(ColorProperty('focusColor', focusColor, defaultValue: defaultData.focusColor, level: DiagnosticLevel.debug)); + properties.add(ColorProperty('hoverColor', hoverColor, defaultValue: defaultData.hoverColor, level: DiagnosticLevel.debug)); properties.add(ColorProperty('shadowColor', shadowColor, defaultValue: defaultData.shadowColor, level: DiagnosticLevel.debug)); + properties.add(ColorProperty('canvasColor', canvasColor, defaultValue: defaultData.canvasColor, level: DiagnosticLevel.debug)); properties.add(ColorProperty('scaffoldBackgroundColor', scaffoldBackgroundColor, defaultValue: defaultData.scaffoldBackgroundColor, level: DiagnosticLevel.debug)); properties.add(ColorProperty('bottomAppBarColor', bottomAppBarColor, defaultValue: defaultData.bottomAppBarColor, level: DiagnosticLevel.debug)); properties.add(ColorProperty('cardColor', cardColor, defaultValue: defaultData.cardColor, level: DiagnosticLevel.debug)); properties.add(ColorProperty('dividerColor', dividerColor, defaultValue: defaultData.dividerColor, level: DiagnosticLevel.debug)); - properties.add(ColorProperty('focusColor', focusColor, defaultValue: defaultData.focusColor, level: DiagnosticLevel.debug)); - properties.add(ColorProperty('hoverColor', hoverColor, defaultValue: defaultData.hoverColor, level: DiagnosticLevel.debug)); properties.add(ColorProperty('highlightColor', highlightColor, defaultValue: defaultData.highlightColor, level: DiagnosticLevel.debug)); properties.add(ColorProperty('splashColor', splashColor, defaultValue: defaultData.splashColor, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('splashFactory', splashFactory, defaultValue: defaultData.splashFactory, level: DiagnosticLevel.debug)); properties.add(ColorProperty('selectedRowColor', selectedRowColor, defaultValue: defaultData.selectedRowColor, level: DiagnosticLevel.debug)); properties.add(ColorProperty('unselectedWidgetColor', unselectedWidgetColor, defaultValue: defaultData.unselectedWidgetColor, level: DiagnosticLevel.debug)); properties.add(ColorProperty('disabledColor', disabledColor, defaultValue: defaultData.disabledColor, level: DiagnosticLevel.debug)); - properties.add(ColorProperty('buttonColor', buttonColor, defaultValue: defaultData.buttonColor, level: DiagnosticLevel.debug)); properties.add(ColorProperty('secondaryHeaderColor', secondaryHeaderColor, defaultValue: defaultData.secondaryHeaderColor, level: DiagnosticLevel.debug)); - properties.add(ColorProperty('textSelectionColor', textSelectionColor, defaultValue: defaultData.textSelectionColor, level: DiagnosticLevel.debug)); - properties.add(ColorProperty('cursorColor', cursorColor, defaultValue: defaultData.cursorColor, level: DiagnosticLevel.debug)); - properties.add(ColorProperty('textSelectionHandleColor', textSelectionHandleColor, defaultValue: defaultData.textSelectionHandleColor, level: DiagnosticLevel.debug)); properties.add(ColorProperty('backgroundColor', backgroundColor, defaultValue: defaultData.backgroundColor, level: DiagnosticLevel.debug)); properties.add(ColorProperty('dialogBackgroundColor', dialogBackgroundColor, defaultValue: defaultData.dialogBackgroundColor, level: DiagnosticLevel.debug)); properties.add(ColorProperty('indicatorColor', indicatorColor, defaultValue: defaultData.indicatorColor, level: DiagnosticLevel.debug)); properties.add(ColorProperty('hintColor', hintColor, defaultValue: defaultData.hintColor, level: DiagnosticLevel.debug)); properties.add(ColorProperty('errorColor', errorColor, defaultValue: defaultData.errorColor, level: DiagnosticLevel.debug)); properties.add(ColorProperty('toggleableActiveColor', toggleableActiveColor, defaultValue: defaultData.toggleableActiveColor, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('buttonTheme', buttonTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('toggleButtonsTheme', toggleButtonsTheme, level: DiagnosticLevel.debug)); + // TYPOGRAPHY & ICONOGRAPHY + properties.add(DiagnosticsProperty('typography', typography, defaultValue: defaultData.typography, level: DiagnosticLevel.debug)); properties.add(DiagnosticsProperty('textTheme', textTheme, level: DiagnosticLevel.debug)); properties.add(DiagnosticsProperty('primaryTextTheme', primaryTextTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('accentTextTheme', accentTextTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('inputDecorationTheme', inputDecorationTheme, level: DiagnosticLevel.debug)); properties.add(DiagnosticsProperty('iconTheme', iconTheme, level: DiagnosticLevel.debug)); properties.add(DiagnosticsProperty('primaryIconTheme', primaryIconTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('accentIconTheme', accentIconTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('sliderTheme', sliderTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('tabBarTheme', tabBarTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('tooltipTheme', tooltipTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('cardTheme', cardTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('chipTheme', chipTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('materialTapTargetSize', materialTapTargetSize, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('applyElevationOverlayColor', applyElevationOverlayColor, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('pageTransitionsTheme', pageTransitionsTheme, level: DiagnosticLevel.debug)); + // COMPONENT THEMES properties.add(DiagnosticsProperty('appBarTheme', appBarTheme, defaultValue: defaultData.appBarTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('scrollbarTheme', scrollbarTheme, defaultValue: defaultData.scrollbarTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('bannerTheme', bannerTheme, defaultValue: defaultData.bannerTheme, level: DiagnosticLevel.debug)); properties.add(DiagnosticsProperty('bottomAppBarTheme', bottomAppBarTheme, defaultValue: defaultData.bottomAppBarTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('colorScheme', colorScheme, defaultValue: defaultData.colorScheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('bottomNavigationBarTheme', bottomNavigationBarTheme, defaultValue: defaultData.bottomNavigationBarTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('bottomSheetTheme', bottomSheetTheme, defaultValue: defaultData.bottomSheetTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('buttonBarTheme', buttonBarTheme, defaultValue: defaultData.buttonBarTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('buttonTheme', buttonTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('cardTheme', cardTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('checkboxTheme', checkboxTheme, defaultValue: defaultData.checkboxTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('chipTheme', chipTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('dataTableTheme', dataTableTheme, defaultValue: defaultData.dataTableTheme, level: DiagnosticLevel.debug)); properties.add(DiagnosticsProperty('dialogTheme', dialogTheme, defaultValue: defaultData.dialogTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('dividerTheme', dividerTheme, defaultValue: defaultData.dividerTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('drawerTheme', drawerTheme, defaultValue: defaultData.drawerTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('elevatedButtonTheme', elevatedButtonTheme, defaultValue: defaultData.elevatedButtonTheme, level: DiagnosticLevel.debug)); properties.add(DiagnosticsProperty('floatingActionButtonTheme', floatingActionButtonTheme, defaultValue: defaultData.floatingActionButtonTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('listTileTheme', listTileTheme, defaultValue: defaultData.listTileTheme, level: DiagnosticLevel.debug)); properties.add(DiagnosticsProperty('navigationBarTheme', navigationBarTheme, defaultValue: defaultData.navigationBarTheme, level: DiagnosticLevel.debug)); properties.add(DiagnosticsProperty('navigationRailTheme', navigationRailTheme, defaultValue: defaultData.navigationRailTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('typography', typography, defaultValue: defaultData.typography, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('cupertinoOverrideTheme', cupertinoOverrideTheme, defaultValue: defaultData.cupertinoOverrideTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('snackBarTheme', snackBarTheme, defaultValue: defaultData.snackBarTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('bottomSheetTheme', bottomSheetTheme, defaultValue: defaultData.bottomSheetTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('popupMenuTheme', popupMenuTheme, defaultValue: defaultData.popupMenuTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('bannerTheme', bannerTheme, defaultValue: defaultData.bannerTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('dividerTheme', dividerTheme, defaultValue: defaultData.dividerTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('buttonBarTheme', buttonBarTheme, defaultValue: defaultData.buttonBarTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('timePickerTheme', timePickerTheme, defaultValue: defaultData.timePickerTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('textSelectionTheme', textSelectionTheme, defaultValue: defaultData.textSelectionTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('bottomNavigationBarTheme', bottomNavigationBarTheme, defaultValue: defaultData.bottomNavigationBarTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('textButtonTheme', textButtonTheme, defaultValue: defaultData.textButtonTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('elevatedButtonTheme', elevatedButtonTheme, defaultValue: defaultData.elevatedButtonTheme, level: DiagnosticLevel.debug)); properties.add(DiagnosticsProperty('outlinedButtonTheme', outlinedButtonTheme, defaultValue: defaultData.outlinedButtonTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('dataTableTheme', dataTableTheme, defaultValue: defaultData.dataTableTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('checkboxTheme', checkboxTheme, defaultValue: defaultData.checkboxTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('radioTheme', radioTheme, defaultValue: defaultData.radioTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('switchTheme', switchTheme, defaultValue: defaultData.switchTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('popupMenuTheme', popupMenuTheme, defaultValue: defaultData.popupMenuTheme, level: DiagnosticLevel.debug)); properties.add(DiagnosticsProperty('progressIndicatorTheme', progressIndicatorTheme, defaultValue: defaultData.progressIndicatorTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('drawerTheme', drawerTheme, defaultValue: defaultData.drawerTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('listTileTheme', listTileTheme, defaultValue: defaultData.listTileTheme, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('fixTextFieldOutlineLabel', fixTextFieldOutlineLabel, defaultValue: true, level: DiagnosticLevel.debug)); - properties.add(DiagnosticsProperty('useTextSelectionTheme', useTextSelectionTheme, defaultValue: true, level: DiagnosticLevel.debug)); - properties.add(EnumProperty('androidOverscrollIndicator', androidOverscrollIndicator, defaultValue: null, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('radioTheme', radioTheme, defaultValue: defaultData.radioTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('sliderTheme', sliderTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('snackBarTheme', snackBarTheme, defaultValue: defaultData.snackBarTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('switchTheme', switchTheme, defaultValue: defaultData.switchTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('tabBarTheme', tabBarTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('textButtonTheme', textButtonTheme, defaultValue: defaultData.textButtonTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('textSelectionTheme', textSelectionTheme, defaultValue: defaultData.textSelectionTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('timePickerTheme', timePickerTheme, defaultValue: defaultData.timePickerTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('toggleButtonsTheme', toggleButtonsTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('tooltipTheme', tooltipTheme, level: DiagnosticLevel.debug)); + // DEPRECATED (newest deprecations at the bottom) + properties.add(DiagnosticsProperty('useTextSelectionTheme', useTextSelectionTheme, level: DiagnosticLevel.debug)); + properties.add(ColorProperty('textSelectionColor', textSelectionColor, defaultValue: defaultData.textSelectionColor, level: DiagnosticLevel.debug)); + properties.add(ColorProperty('cursorColor', cursorColor, defaultValue: defaultData.cursorColor, level: DiagnosticLevel.debug)); + properties.add(ColorProperty('textSelectionHandleColor', textSelectionHandleColor, defaultValue: defaultData.textSelectionHandleColor, level: DiagnosticLevel.debug)); + properties.add(ColorProperty('accentColor', accentColor, defaultValue: defaultData.accentColor, level: DiagnosticLevel.debug)); + properties.add(EnumProperty('accentColorBrightness', accentColorBrightness, defaultValue: defaultData.accentColorBrightness, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('accentTextTheme', accentTextTheme, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('accentIconTheme', accentIconTheme, level: DiagnosticLevel.debug)); + properties.add(ColorProperty('buttonColor', buttonColor, defaultValue: defaultData.buttonColor, level: DiagnosticLevel.debug)); + properties.add(DiagnosticsProperty('fixTextFieldOutlineLabel', fixTextFieldOutlineLabel, level: DiagnosticLevel.debug)); } } @@ -2286,6 +2366,7 @@ class VisualDensity with Diagnosticable { }) : assert(horizontal != null), assert(vertical != null), assert(vertical <= maximumDensity), + assert(vertical <= maximumDensity), assert(vertical >= minimumDensity), assert(horizontal <= maximumDensity), assert(horizontal >= minimumDensity); diff --git a/packages/flutter/test/material/theme_data_test.dart b/packages/flutter/test/material/theme_data_test.dart index 758b7d35d6e..e310f2e08a0 100644 --- a/packages/flutter/test/material/theme_data_test.dart +++ b/packages/flutter/test/material/theme_data_test.dart @@ -666,88 +666,93 @@ void main() { test('ThemeData diagnostics include all properties', () { // List of properties must match the properties in ThemeData.hashCode() final Set expectedPropertyNames = { + // 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();