copyWith method

ButtonProps copyWith({
  1. String? label,
  2. ArcaneGlyph? icon,
  3. ButtonIconPosition? iconPosition,
  4. void onPressed()?,
  5. ArcaneInteraction? action,
  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. ButtonType? type,
  15. ArcaneStyleData? styles,
  16. ArcaneDecoration? decoration,
})

Implementation

ButtonProps copyWith({
  String? label,
  ArcaneGlyph? icon,
  ButtonIconPosition? iconPosition,
  void Function()? onPressed,
  ArcaneInteraction? action,
  ButtonVariant? variant,
  ButtonSize? size,
  bool? disabled,
  bool? loading,
  bool? fullWidth,
  String? id,
  Map<String, String>? attributes,
  String? href,
  ButtonType? type,
  ArcaneStyleData? styles,
  ArcaneDecoration? decoration,
}) {
  return ButtonProps(
    label: label ?? this.label,
    icon: icon ?? this.icon,
    iconPosition: iconPosition ?? this.iconPosition,
    onPressed: onPressed ?? this.onPressed,
    action: action ?? this.action,
    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,
    type: type ?? this.type,
    styles: styles ?? this.styles,
    decoration: decoration ?? this.decoration,
  );
}