ThemeData.raw constructor Null safety

const ThemeData.raw(
  1. {required VisualDensity visualDensity,
  2. required Color primaryColor,
  3. required Brightness primaryColorBrightness,
  4. required Color primaryColorLight,
  5. required Color primaryColorDark,
  6. required Color canvasColor,
  7. required Color shadowColor,
  8. @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 Color accentColor,
  9. @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 Brightness accentColorBrightness,
  10. required Color scaffoldBackgroundColor,
  11. required Color bottomAppBarColor,
  12. required Color cardColor,
  13. required Color dividerColor,
  14. required Color focusColor,
  15. required Color hoverColor,
  16. required Color highlightColor,
  17. required Color splashColor,
  18. required InteractiveInkFeatureFactory splashFactory,
  19. required Color selectedRowColor,
  20. required Color unselectedWidgetColor,
  21. required Color disabledColor,
  22. required ButtonThemeData buttonTheme,
  23. @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 Color buttonColor,
  24. required ToggleButtonsThemeData toggleButtonsTheme,
  25. required Color secondaryHeaderColor,
  26. @Deprecated('Use TextSelectionThemeData.selectionColor instead. ' 'This feature was deprecated after v1.26.0-18.0.pre.') required Color textSelectionColor,
  27. @Deprecated('Use TextSelectionThemeData.cursorColor instead. ' 'This feature was deprecated after v1.26.0-18.0.pre.') required Color cursorColor,
  28. @Deprecated('Use TextSelectionThemeData.selectionHandleColor instead. ' 'This feature was deprecated after v1.26.0-18.0.pre.') required Color textSelectionHandleColor,
  29. required Color backgroundColor,
  30. required Color dialogBackgroundColor,
  31. required Color indicatorColor,
  32. required Color hintColor,
  33. required Color errorColor,
  34. required Color toggleableActiveColor,
  35. required TextTheme textTheme,
  36. required TextTheme primaryTextTheme,
  37. @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 TextTheme accentTextTheme,
  38. required InputDecorationTheme inputDecorationTheme,
  39. required IconThemeData iconTheme,
  40. required IconThemeData primaryIconTheme,
  41. @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 IconThemeData accentIconTheme,
  42. required SliderThemeData sliderTheme,
  43. required TabBarTheme tabBarTheme,
  44. required TooltipThemeData tooltipTheme,
  45. required CardTheme cardTheme,
  46. required ChipThemeData chipTheme,
  47. required TargetPlatform platform,
  48. required MaterialTapTargetSize materialTapTargetSize,
  49. required bool applyElevationOverlayColor,
  50. required PageTransitionsTheme pageTransitionsTheme,
  51. required AppBarTheme appBarTheme,
  52. required ScrollbarThemeData scrollbarTheme,
  53. required BottomAppBarTheme bottomAppBarTheme,
  54. required ColorScheme colorScheme,
  55. required DialogTheme dialogTheme,
  56. required FloatingActionButtonThemeData floatingActionButtonTheme,
  57. required NavigationRailThemeData navigationRailTheme,
  58. required Typography typography,
  59. required NoDefaultCupertinoThemeData? cupertinoOverrideTheme,
  60. required SnackBarThemeData snackBarTheme,
  61. required BottomSheetThemeData bottomSheetTheme,
  62. required PopupMenuThemeData popupMenuTheme,
  63. required MaterialBannerThemeData bannerTheme,
  64. required DividerThemeData dividerTheme,
  65. required ButtonBarThemeData buttonBarTheme,
  66. required BottomNavigationBarThemeData bottomNavigationBarTheme,
  67. required TimePickerThemeData timePickerTheme,
  68. required TextButtonThemeData textButtonTheme,
  69. required ElevatedButtonThemeData elevatedButtonTheme,
  70. required OutlinedButtonThemeData outlinedButtonTheme,
  71. required TextSelectionThemeData textSelectionTheme,
  72. required DataTableThemeData dataTableTheme,
  73. required CheckboxThemeData checkboxTheme,
  74. required RadioThemeData radioTheme,
  75. required SwitchThemeData switchTheme,
  76. required ProgressIndicatorThemeData progressIndicatorTheme,
  77. @Deprecated('This "fix" is now enabled by default. ' 'This feature was deprecated after v2.5.0-1.0.pre.') required bool fixTextFieldOutlineLabel,
  78. @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 bool useTextSelectionTheme}
)

Create a ThemeData given a set of exact values. All the values must be specified. They all must also be non-null except for cupertinoOverrideTheme.

This will rarely be used directly. It is used by lerp to create intermediate themes based on two themes created with the ThemeData constructor.

Implementation

const ThemeData.raw({
  // 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.
  required this.visualDensity,
  required this.primaryColor,
  required this.primaryColorBrightness,
  required this.primaryColorLight,
  required this.primaryColorDark,
  required this.canvasColor,
  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.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.buttonTheme,
  @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,
  required this.toggleButtonsTheme,
  required this.secondaryHeaderColor,
  @Deprecated(
    'Use TextSelectionThemeData.selectionColor instead. '
    'This feature was deprecated after v1.26.0-18.0.pre.',
  )
  required this.textSelectionColor,
  @Deprecated(
    'Use TextSelectionThemeData.cursorColor instead. '
    'This feature was deprecated after v1.26.0-18.0.pre.',
  )
  required this.cursorColor,
  @Deprecated(
    'Use TextSelectionThemeData.selectionHandleColor instead. '
    '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(
    '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.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 '
    '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.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.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,
  @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,
}) : assert(visualDensity != null),
     assert(primaryColor != null),
     assert(primaryColorBrightness != null),
     assert(primaryColorLight != null),
     assert(primaryColorDark != null),
     assert(accentColor != null),
     assert(accentColorBrightness != null),
     assert(canvasColor != null),
     assert(shadowColor != 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(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),
     assert(appBarTheme != null),
     assert(scrollbarTheme != null),
     assert(bottomAppBarTheme != null),
     assert(colorScheme != null),
     assert(dialogTheme != null),
     assert(floatingActionButtonTheme != 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(progressIndicatorTheme != null),
     assert(fixTextFieldOutlineLabel != null),
     assert(useTextSelectionTheme != null);