copyWith method
ThemeData
copyWith({
- Brightness? brightness,
- Typography? typography,
- AccentColor? accentColor,
- Color? activeColor,
- Color? inactiveColor,
- Color? inactiveBackgroundColor,
- Color? disabledColor,
- Color? scaffoldBackgroundColor,
- 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,
- RadioButtonThemeData? radioButtonTheme,
- ToggleButtonThemeData? toggleButtonTheme,
- SliderThemeData? sliderTheme,
- InfoBarThemeData? infoBarTheme,
- FocusThemeData? focusTheme,
- 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),
);
}