copyWith method

ThemeData copyWith ({Brightness brightness, Color primaryColor, Brightness primaryColorBrightness, Color primaryColorLight, Color primaryColorDark, Color accentColor, Brightness accentColorBrightness, 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, ButtonThemeData buttonTheme, ToggleButtonsTheme toggleButtonsTheme, Color buttonColor, Color secondaryHeaderColor, Color textSelectionColor, Color cursorColor, Color textSelectionHandleColor, Color backgroundColor, Color dialogBackgroundColor, Color indicatorColor, Color hintColor, Color errorColor, Color toggleableActiveColor, TextTheme textTheme, TextTheme primaryTextTheme, TextTheme accentTextTheme, InputDecorationTheme inputDecorationTheme, IconThemeData iconTheme, IconThemeData primaryIconTheme, IconThemeData accentIconTheme, SliderThemeData sliderTheme, TabBarTheme tabBarTheme, TooltipThemeData tooltipTheme, CardTheme cardTheme, ChipThemeData chipTheme, TargetPlatform platform, MaterialTapTargetSize materialTapTargetSize, bool applyElevationOverlayColor, PageTransitionsTheme pageTransitionsTheme, AppBarTheme appBarTheme, BottomAppBarTheme bottomAppBarTheme, ColorScheme colorScheme, DialogTheme dialogTheme, FloatingActionButtonThemeData floatingActionButtonTheme, Typography typography, CupertinoThemeData cupertinoOverrideTheme, SnackBarThemeData snackBarTheme, BottomSheetThemeData bottomSheetTheme, PopupMenuThemeData popupMenuTheme, MaterialBannerThemeData bannerTheme, DividerThemeData dividerTheme })

Creates a copy of this theme but with the given fields replaced with the new values.

Implementation

ThemeData copyWith({
  Brightness brightness,
  Color primaryColor,
  Brightness primaryColorBrightness,
  Color primaryColorLight,
  Color primaryColorDark,
  Color accentColor,
  Brightness accentColorBrightness,
  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,
  ButtonThemeData buttonTheme,
  ToggleButtonsTheme toggleButtonsTheme,
  Color buttonColor,
  Color secondaryHeaderColor,
  Color textSelectionColor,
  Color cursorColor,
  Color textSelectionHandleColor,
  Color backgroundColor,
  Color dialogBackgroundColor,
  Color indicatorColor,
  Color hintColor,
  Color errorColor,
  Color toggleableActiveColor,
  TextTheme textTheme,
  TextTheme primaryTextTheme,
  TextTheme accentTextTheme,
  InputDecorationTheme inputDecorationTheme,
  IconThemeData iconTheme,
  IconThemeData primaryIconTheme,
  IconThemeData accentIconTheme,
  SliderThemeData sliderTheme,
  TabBarTheme tabBarTheme,
  TooltipThemeData tooltipTheme,
  CardTheme cardTheme,
  ChipThemeData chipTheme,
  TargetPlatform platform,
  MaterialTapTargetSize materialTapTargetSize,
  bool applyElevationOverlayColor,
  PageTransitionsTheme pageTransitionsTheme,
  AppBarTheme appBarTheme,
  BottomAppBarTheme bottomAppBarTheme,
  ColorScheme colorScheme,
  DialogTheme dialogTheme,
  FloatingActionButtonThemeData floatingActionButtonTheme,
  Typography typography,
  CupertinoThemeData cupertinoOverrideTheme,
  SnackBarThemeData snackBarTheme,
  BottomSheetThemeData bottomSheetTheme,
  PopupMenuThemeData popupMenuTheme,
  MaterialBannerThemeData bannerTheme,
  DividerThemeData dividerTheme,
}) {
  cupertinoOverrideTheme = cupertinoOverrideTheme?.noDefault();
  return ThemeData.raw(
    brightness: brightness ?? this.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,
    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,
    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,
    appBarTheme: appBarTheme ?? this.appBarTheme,
    bottomAppBarTheme: bottomAppBarTheme ?? this.bottomAppBarTheme,
    colorScheme: colorScheme ?? this.colorScheme,
    dialogTheme: dialogTheme ?? this.dialogTheme,
    floatingActionButtonTheme: floatingActionButtonTheme ?? this.floatingActionButtonTheme,
    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,
  );
}