copyWith method
ButtonThemeData
copyWith({
- Axis? axis,
- IconThemeData? iconThemeData,
- double? itemSpacing,
- double? filledSpacing,
- double? height,
- double? minWidth,
- TextStyle? textStyle,
- Color? disabledColor,
- Color? color,
- Color? focusColor,
- Color? hoverColor,
- Color? highlightColor,
- Color? background,
- Color? focusBackground,
- Color? hoverBackground,
- Color? highlightBackground,
- Color? foreground,
- Color? hoverForeground,
- Color? highlightForeground,
- Duration? animationDuration,
Makes a copy of ButtonThemeData overwriting selected fields.
Implementation
ButtonThemeData copyWith({
Axis? axis,
IconThemeData? iconThemeData,
double? itemSpacing,
double? filledSpacing,
double? height,
double? minWidth,
TextStyle? textStyle,
Color? disabledColor,
Color? color,
Color? focusColor,
Color? hoverColor,
Color? highlightColor,
Color? background,
Color? focusBackground,
Color? hoverBackground,
Color? highlightBackground,
Color? foreground,
Color? hoverForeground,
Color? highlightForeground,
Duration? animationDuration,
}) {
return ButtonThemeData(
axis: axis ?? this.axis,
iconThemeData: iconThemeData ?? this.iconThemeData,
itemSpacing: itemSpacing ?? this.itemSpacing,
filledSpacing: filledSpacing ?? this.filledSpacing,
height: height ?? this.height,
minWidth: minWidth ?? this.minWidth,
textStyle: textStyle ?? this.textStyle,
disabledColor: disabledColor ?? this.disabledColor,
color: color ?? this.color,
focusColor: focusColor ?? this.focusColor,
hoverColor: hoverColor ?? this.hoverColor,
highlightColor: highlightColor ?? this.highlightColor,
background: background ?? this.background,
focusBackground: focusBackground ?? this.focusBackground,
hoverBackground: hoverBackground ?? this.hoverBackground,
highlightBackground: highlightBackground ?? this.highlightBackground,
foreground: foreground ?? this.foreground,
hoverForeground: hoverForeground ?? this.hoverForeground,
highlightForeground: highlightForeground ?? this.highlightForeground,
animationDuration: animationDuration ?? this.animationDuration,
);
}