copyWith method
- String? label,
- VoidCallback? onPressed,
- ZetaButtonType? type,
- ZetaWidgetSize? size,
- ZetaWidgetBorder? borderType,
- IconData? leadingIcon,
- IconData? trailingIcon,
- Key? key,
Creates a clone.
Implementation
ZetaButton copyWith({
String? label,
VoidCallback? onPressed,
ZetaButtonType? type,
ZetaWidgetSize? size,
ZetaWidgetBorder? borderType,
IconData? leadingIcon,
IconData? trailingIcon,
Key? key,
}) {
return ZetaButton(
label: label ?? this.label,
onPressed: onPressed ?? this.onPressed,
type: type ?? this.type,
size: size ?? this.size,
borderType: borderType ?? this.borderType,
leadingIcon: leadingIcon ?? this.leadingIcon,
trailingIcon: trailingIcon ?? this.trailingIcon,
key: key ?? this.key,
);
}