copyWith method

ButtonProps copyWith({
  1. String? label,
  2. Widget? child,
  3. Widget? icon,
  4. Widget? trailing,
  5. void onPressed()?,
  6. ButtonVariant? variant,
  7. ButtonSize? size,
  8. bool? disabled,
  9. bool? loading,
  10. bool? fullWidth,
  11. String? id,
  12. Map<String, String>? attributes,
  13. String? href,
  14. 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,
  );
}