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 highlightColor, Color splashColor, InteractiveInkFeatureFactory splashFactory, Color selectedRowColor, Color unselectedWidgetColor, Color disabledColor, ButtonThemeData buttonTheme, 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, ChipThemeData chipTheme, TargetPlatform platform, MaterialTapTargetSize materialTapTargetSize, PageTransitionsTheme pageTransitionsTheme, ColorScheme colorScheme, DialogTheme dialogTheme, Typography typography })

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 highlightColor,
  Color splashColor,
  InteractiveInkFeatureFactory splashFactory,
  Color selectedRowColor,
  Color unselectedWidgetColor,
  Color disabledColor,
  ButtonThemeData buttonTheme,
  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,
  ChipThemeData chipTheme,
  TargetPlatform platform,
  MaterialTapTargetSize materialTapTargetSize,
  PageTransitionsTheme pageTransitionsTheme,
  ColorScheme colorScheme,
  DialogTheme dialogTheme,
  Typography typography,
}) {
  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,
    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,
    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,
    chipTheme: chipTheme ?? this.chipTheme,
    platform: platform ?? this.platform,
    materialTapTargetSize: materialTapTargetSize ?? this.materialTapTargetSize,
    pageTransitionsTheme: pageTransitionsTheme ?? this.pageTransitionsTheme,
    colorScheme: colorScheme ?? this.colorScheme,
    dialogTheme: dialogTheme ?? this.dialogTheme,
    typography: typography ?? this.typography,
  );
}