copyWith method
ButtonProps
copyWith(
{ - String? label,
- Widget? child,
- Widget? icon,
- Widget? trailing,
- void onPressed()?,
- ButtonVariant? variant,
- ButtonSize? size,
- bool? disabled,
- bool? loading,
- bool? fullWidth,
- String? id,
- Map<String, String>? attributes,
- String? href,
- bool? showArrow,
})
Implementation
ButtonProps copyWith({
String? label,
Widget? child,
Widget? icon,
Widget? trailing,
void Function()? onPressed,
ButtonVariant? variant,
ButtonSize? size,
bool? disabled,
bool? loading,
bool? fullWidth,
String? id,
Map<String, String>? attributes,
String? href,
bool? showArrow,
}) {
return ButtonProps(
label: label ?? this.label,
child: child ?? this.child,
icon: icon ?? this.icon,
trailing: trailing ?? this.trailing,
onPressed: onPressed ?? this.onPressed,
variant: variant ?? this.variant,
size: size ?? this.size,
disabled: disabled ?? this.disabled,
loading: loading ?? this.loading,
fullWidth: fullWidth ?? this.fullWidth,
id: id ?? this.id,
attributes: attributes ?? this.attributes,
href: href ?? this.href,
showArrow: showArrow ?? this.showArrow,
);
}