copyWith method

ThemeData copyWith({
  1. Brightness? brightness,
  2. Typography? typography,
  3. AccentColor? accentColor,
  4. Color? activeColor,
  5. Color? inactiveColor,
  6. Color? inactiveBackgroundColor,
  7. Color? disabledColor,
  8. Color? scaffoldBackgroundColor,
  9. Color? navigationPanelBackgroundColor,
  10. Color? shadowColor,
  11. Duration? fasterAnimationDuration,
  12. Duration? fastAnimationDuration,
  13. Duration? mediumAnimationDuration,
  14. Duration? slowAnimationDuration,
  15. Curve? animationCurve,
  16. ButtonState<MouseCursor>? inputMouseCursor,
  17. ButtonThemeData? buttonTheme,
  18. CheckboxThemeData? checkboxTheme,
  19. ToggleSwitchThemeData? toggleSwitchTheme,
  20. IconThemeData? iconTheme,
  21. SplitButtonThemeData? splitButtonTheme,
  22. ContentDialogThemeData? dialogTheme,
  23. TooltipThemeData? tooltipTheme,
  24. DividerThemeData? dividerTheme,
  25. NavigationPanelThemeData? navigationPanelTheme,
  26. RadioButtonThemeData? radioButtonTheme,
  27. ToggleButtonThemeData? toggleButtonTheme,
  28. SliderThemeData? sliderTheme,
  29. InfoBarThemeData? infoBarTheme,
  30. FocusThemeData? focusTheme,
  31. ScrollbarThemeData? scrollbarTheme,
})

Implementation

ThemeData copyWith({
  Brightness? brightness,
  Typography? typography,
  AccentColor? accentColor,
  Color? activeColor,
  Color? inactiveColor,
  Color? inactiveBackgroundColor,
  Color? disabledColor,
  Color? scaffoldBackgroundColor,
  Color? navigationPanelBackgroundColor,
  Color? shadowColor,
  Duration? fasterAnimationDuration,
  Duration? fastAnimationDuration,
  Duration? mediumAnimationDuration,
  Duration? slowAnimationDuration,
  Curve? animationCurve,
  ButtonState<MouseCursor>? inputMouseCursor,
  ButtonThemeData? buttonTheme,
  CheckboxThemeData? checkboxTheme,
  ToggleSwitchThemeData? toggleSwitchTheme,
  IconThemeData? iconTheme,
  SplitButtonThemeData? splitButtonTheme,
  ContentDialogThemeData? dialogTheme,
  TooltipThemeData? tooltipTheme,
  DividerThemeData? dividerTheme,
  NavigationPanelThemeData? navigationPanelTheme,
  RadioButtonThemeData? radioButtonTheme,
  ToggleButtonThemeData? toggleButtonTheme,
  SliderThemeData? sliderTheme,
  InfoBarThemeData? infoBarTheme,
  FocusThemeData? focusTheme,
  ScrollbarThemeData? scrollbarTheme,
}) {
  return ThemeData.raw(
    brightness: brightness ?? this.brightness,
    typography: typography ?? this.typography,
    accentColor: accentColor ?? this.accentColor,
    activeColor: activeColor ?? this.activeColor,
    inactiveColor: inactiveColor ?? this.inactiveColor,
    shadowColor: shadowColor ?? this.shadowColor,
    inactiveBackgroundColor:
        inactiveBackgroundColor ?? this.inactiveBackgroundColor,
    disabledColor: disabledColor ?? this.disabledColor,
    scaffoldBackgroundColor:
        scaffoldBackgroundColor ?? this.scaffoldBackgroundColor,
    navigationPanelBackgroundColor:
        navigationPanelBackgroundColor ?? this.navigationPanelBackgroundColor,
    fasterAnimationDuration:
        fasterAnimationDuration ?? this.fasterAnimationDuration,
    fastAnimationDuration:
        fastAnimationDuration ?? this.fastAnimationDuration,
    mediumAnimationDuration:
        mediumAnimationDuration ?? this.mediumAnimationDuration,
    slowAnimationDuration:
        slowAnimationDuration ?? this.slowAnimationDuration,
    inputMouseCursor: inputMouseCursor ?? this.inputMouseCursor,
    animationCurve: animationCurve ?? this.animationCurve,
    buttonTheme: this.buttonTheme.copyWith(buttonTheme),
    checkboxTheme: this.checkboxTheme.copyWith(checkboxTheme),
    dialogTheme: this.dialogTheme.copyWith(dialogTheme),
    dividerTheme: this.dividerTheme.copyWith(dividerTheme),
    focusTheme: this.focusTheme.copyWith(focusTheme),
    iconTheme: this.iconTheme.copyWith(iconTheme),
    infoBarTheme: this.infoBarTheme.copyWith(infoBarTheme),
    navigationPanelTheme:
        this.navigationPanelTheme.copyWith(navigationPanelTheme),
    radioButtonTheme: this.radioButtonTheme.copyWith(radioButtonTheme),
    scrollbarTheme: this.scrollbarTheme.copyWith(scrollbarTheme),
    sliderTheme: this.sliderTheme.copyWith(sliderTheme),
    splitButtonTheme: this.splitButtonTheme.copyWith(splitButtonTheme),
    toggleButtonTheme: this.toggleButtonTheme.copyWith(toggleButtonTheme),
    toggleSwitchTheme: this.toggleSwitchTheme.copyWith(toggleSwitchTheme),
    tooltipTheme: this.tooltipTheme.copyWith(tooltipTheme),
  );
}