copyWith method
Creates a copy of this style with the given fields replaced.
Implementation
ButtonStyle copyWith({
Color? foregroundColor,
Color? backgroundColor,
Color? focusColor,
Color? focusBackgroundColor,
Color? disabledColor,
Color? disabledBackgroundColor,
EdgeInsets? padding,
bool? bold,
}) {
return ButtonStyle(
foregroundColor: foregroundColor ?? this.foregroundColor,
backgroundColor: backgroundColor ?? this.backgroundColor,
focusColor: focusColor ?? this.focusColor,
focusBackgroundColor: focusBackgroundColor ?? this.focusBackgroundColor,
disabledColor: disabledColor ?? this.disabledColor,
disabledBackgroundColor:
disabledBackgroundColor ?? this.disabledBackgroundColor,
padding: padding ?? this.padding,
bold: bold ?? this.bold,
);
}