copyWith method
CNButtonDataConfig
copyWith({
- double? width,
- CNButtonStyle? style,
- EdgeInsets? padding,
- double? borderRadius,
- double? minHeight,
- double? imagePadding,
- CNImagePlacement? imagePlacement,
- String? glassEffectUnionId,
- String? glassEffectId,
- 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,
);
}