copyWith method
ThemeData
copyWith({
- Brightness? brightness,
- VisualDensity? visualDensity,
- Typography? typography,
- AccentColor? accentColor,
- Color? activeColor,
- Color? inactiveColor,
- Color? inactiveBackgroundColor,
- Color? disabledColor,
- Color? scaffoldBackgroundColor,
- Color? acrylicBackgroundColor,
- Color? shadowColor,
- Duration? fasterAnimationDuration,
- Duration? fastAnimationDuration,
- Duration? mediumAnimationDuration,
- Duration? slowAnimationDuration,
- Curve? animationCurve,
- ButtonState<
MouseCursor> ? inputMouseCursor, - ButtonThemeData? buttonTheme,
- BottomSheetThemeData? bottomSheetTheme,
- CheckboxThemeData? checkboxTheme,
- ChipThemeData? chipTheme,
- ToggleSwitchThemeData? toggleSwitchTheme,
- IconThemeData? iconTheme,
- SplitButtonThemeData? splitButtonTheme,
- ContentDialogThemeData? dialogTheme,
- TooltipThemeData? tooltipTheme,
- DividerThemeData? dividerTheme,
- RadioButtonThemeData? radioButtonTheme,
- ToggleButtonThemeData? toggleButtonTheme,
- SliderThemeData? sliderTheme,
- InfoBarThemeData? infoBarTheme,
- PillButtonBarThemeData? pillButtonBarTheme,
- FocusThemeData? focusTheme,
- ScrollbarThemeData? scrollbarTheme,
- SnackbarThemeData? snackbarTheme,
Implementation
ThemeData copyWith({
Brightness? brightness,
VisualDensity? visualDensity,
Typography? typography,
AccentColor? accentColor,
Color? activeColor,
Color? inactiveColor,
Color? inactiveBackgroundColor,
Color? disabledColor,
Color? scaffoldBackgroundColor,
Color? acrylicBackgroundColor,
Color? shadowColor,
Duration? fasterAnimationDuration,
Duration? fastAnimationDuration,
Duration? mediumAnimationDuration,
Duration? slowAnimationDuration,
Curve? animationCurve,
ButtonState<MouseCursor>? inputMouseCursor,
ButtonThemeData? buttonTheme,
BottomNavigationThemeData? bottomNavigationTheme,
BottomSheetThemeData? bottomSheetTheme,
CheckboxThemeData? checkboxTheme,
ChipThemeData? chipTheme,
ToggleSwitchThemeData? toggleSwitchTheme,
IconThemeData? iconTheme,
SplitButtonThemeData? splitButtonTheme,
ContentDialogThemeData? dialogTheme,
TooltipThemeData? tooltipTheme,
DividerThemeData? dividerTheme,
NavigationPaneThemeData? navigationPaneTheme,
RadioButtonThemeData? radioButtonTheme,
ToggleButtonThemeData? toggleButtonTheme,
SliderThemeData? sliderTheme,
InfoBarThemeData? infoBarTheme,
PillButtonBarThemeData? pillButtonBarTheme,
FocusThemeData? focusTheme,
ScrollbarThemeData? scrollbarTheme,
SnackbarThemeData? snackbarTheme,
}) {
return ThemeData.raw(
brightness: brightness ?? this.brightness,
visualDensity: visualDensity ?? this.visualDensity,
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,
acrylicBackgroundColor:
acrylicBackgroundColor ?? this.acrylicBackgroundColor,
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.merge(buttonTheme),
bottomNavigationTheme:
this.bottomNavigationTheme.merge(bottomNavigationTheme),
bottomSheetTheme: this.bottomSheetTheme.merge(bottomSheetTheme),
checkboxTheme: this.checkboxTheme.merge(checkboxTheme),
chipTheme: this.chipTheme.merge(chipTheme),
dialogTheme: this.dialogTheme.merge(dialogTheme),
dividerTheme: this.dividerTheme.merge(dividerTheme),
focusTheme: this.focusTheme.merge(focusTheme),
iconTheme: this.iconTheme.merge(iconTheme),
infoBarTheme: this.infoBarTheme.merge(infoBarTheme),
pillButtonBarTheme: this.pillButtonBarTheme.merge(pillButtonBarTheme),
navigationPaneTheme: this.navigationPaneTheme.merge(navigationPaneTheme),
radioButtonTheme: this.radioButtonTheme.merge(radioButtonTheme),
scrollbarTheme: this.scrollbarTheme.merge(scrollbarTheme),
sliderTheme: this.sliderTheme.merge(sliderTheme),
splitButtonTheme: this.splitButtonTheme.merge(splitButtonTheme),
toggleButtonTheme: this.toggleButtonTheme.merge(toggleButtonTheme),
toggleSwitchTheme: this.toggleSwitchTheme.merge(toggleSwitchTheme),
tooltipTheme: this.tooltipTheme.merge(tooltipTheme),
snackbarTheme: this.snackbarTheme.merge(snackbarTheme),
);
}