copyWith method

ButtonConfig copyWith({
  1. Color? backgroundColor,
  2. Color? textColor,
  3. double? fontSize,
  4. bool? enableGradient,
  5. double? borderRadius,
  6. EdgeInsetsGeometry? padding,
  7. Widget? icon,
  8. Widget? suffixIcon,
  9. double? borderWidth,
  10. Color? borderColor,
  11. List<Color>? gradientColors,
  12. Gradient? customGradient,
})

Implementation

ButtonConfig copyWith({
  Color? backgroundColor,
  Color? textColor,
  double? fontSize,
  bool? enableGradient,
  double? borderRadius,
  EdgeInsetsGeometry? padding,
  Widget? icon,
  Widget? suffixIcon,
  double? borderWidth,
  Color? borderColor,
  List<Color>? gradientColors,
  Gradient? customGradient,
}) {
  return ButtonConfig(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    textColor: textColor ?? this.textColor,
    fontSize: fontSize ?? this.fontSize,
    borderRadius: borderRadius ?? this.borderRadius,
    padding: padding ?? this.padding,
    borderWidth: borderWidth ?? this.borderWidth,
    borderColor: borderColor ?? this.borderColor,
  );
}