ThemeData copyWith({Brightness brightness, Color primaryColor, Brightness primaryColorBrightness, Color accentColor, Brightness accentColorBrightness, Color canvasColor, Color scaffoldBackgroundColor, Color cardColor, Color dividerColor, Color highlightColor, Color splashColor, Color selectedRowColor, Color unselectedWidgetColor, Color disabledColor, Color buttonColor, Color secondaryHeaderColor, Color textSelectionColor, Color textSelectionHandleColor, Color backgroundColor, Color indicatorColor, Color hintColor, Color errorColor, TextTheme textTheme, TextTheme primaryTextTheme, TextTheme accentTextTheme, IconThemeData iconTheme, IconThemeData primaryIconTheme, IconThemeData accentIconTheme, TargetPlatform platform })

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

Source

ThemeData copyWith({
  Brightness brightness,
  Color primaryColor,
  Brightness primaryColorBrightness,
  Color accentColor,
  Brightness accentColorBrightness,
  Color canvasColor,
  Color scaffoldBackgroundColor,
  Color cardColor,
  Color dividerColor,
  Color highlightColor,
  Color splashColor,
  Color selectedRowColor,
  Color unselectedWidgetColor,
  Color disabledColor,
  Color buttonColor,
  Color secondaryHeaderColor,
  Color textSelectionColor,
  Color textSelectionHandleColor,
  Color backgroundColor,
  Color indicatorColor,
  Color hintColor,
  Color errorColor,
  TextTheme textTheme,
  TextTheme primaryTextTheme,
  TextTheme accentTextTheme,
  IconThemeData iconTheme,
  IconThemeData primaryIconTheme,
  IconThemeData accentIconTheme,
  TargetPlatform platform,
}) {
  return new ThemeData.raw(
    brightness: brightness ?? this.brightness,
    primaryColor: primaryColor ?? this.primaryColor,
    primaryColorBrightness: primaryColorBrightness ?? this.primaryColorBrightness,
    accentColor: accentColor ?? this.accentColor,
    accentColorBrightness: accentColorBrightness ?? this.accentColorBrightness,
    canvasColor: canvasColor ?? this.canvasColor,
    scaffoldBackgroundColor: scaffoldBackgroundColor ?? this.scaffoldBackgroundColor,
    cardColor: cardColor ?? this.cardColor,
    dividerColor: dividerColor ?? this.dividerColor,
    highlightColor: highlightColor ?? this.highlightColor,
    splashColor: splashColor ?? this.splashColor,
    selectedRowColor: selectedRowColor ?? this.selectedRowColor,
    unselectedWidgetColor: unselectedWidgetColor ?? this.unselectedWidgetColor,
    disabledColor: disabledColor ?? this.disabledColor,
    buttonColor: buttonColor ?? this.buttonColor,
    secondaryHeaderColor: secondaryHeaderColor ?? this.secondaryHeaderColor,
    textSelectionColor: textSelectionColor ?? this.textSelectionColor,
    textSelectionHandleColor: textSelectionHandleColor ?? this.textSelectionHandleColor,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    indicatorColor: indicatorColor ?? this.indicatorColor,
    hintColor: hintColor ?? this.hintColor,
    errorColor: errorColor ?? this.errorColor,
    textTheme: textTheme ?? this.textTheme,
    primaryTextTheme: primaryTextTheme ?? this.primaryTextTheme,
    accentTextTheme: accentTextTheme ?? this.accentTextTheme,
    iconTheme: iconTheme ?? this.iconTheme,
    primaryIconTheme: primaryIconTheme ?? this.primaryIconTheme,
    accentIconTheme: accentIconTheme ?? this.accentIconTheme,
    platform: platform ?? this.platform,
  );
}