copyWith method

CNButtonDataConfig copyWith({
  1. double? width,
  2. CNButtonStyle? style,
  3. EdgeInsets? padding,
  4. double? borderRadius,
  5. double? minHeight,
  6. double? imagePadding,
  7. CNImagePlacement? imagePlacement,
  8. String? glassEffectUnionId,
  9. String? glassEffectId,
  10. bool? glassEffectInteractive,
})

Creates a copy with the given fields replaced.

Implementation

CNButtonDataConfig copyWith({
  double? width,
  CNButtonStyle? style,
  EdgeInsets? padding,
  double? borderRadius,
  double? minHeight,
  double? imagePadding,
  CNImagePlacement? imagePlacement,
  String? glassEffectUnionId,
  String? glassEffectId,
  bool? glassEffectInteractive,
}) {
  return CNButtonDataConfig(
    width: width ?? this.width,
    style: style ?? this.style,
    padding: padding ?? this.padding,
    borderRadius: borderRadius ?? this.borderRadius,
    minHeight: minHeight ?? this.minHeight,
    imagePadding: imagePadding ?? this.imagePadding,
    imagePlacement: imagePlacement ?? this.imagePlacement,
    glassEffectUnionId: glassEffectUnionId ?? this.glassEffectUnionId,
    glassEffectId: glassEffectId ?? this.glassEffectId,
    glassEffectInteractive:
        glassEffectInteractive ?? this.glassEffectInteractive,
  );
}