copyWith method

IconButtonProps copyWith({
  1. Component? icon,
  2. void onPressed()?,
  3. IconButtonVariant? variant,
  4. IconButtonSize? size,
  5. bool? disabled,
  6. bool? loading,
  7. String? tooltip,
})

Implementation

IconButtonProps copyWith({
  Component? icon,
  void Function()? onPressed,
  IconButtonVariant? variant,
  IconButtonSize? size,
  bool? disabled,
  bool? loading,
  String? tooltip,
}) {
  return IconButtonProps(
    icon: icon ?? this.icon,
    onPressed: onPressed ?? this.onPressed,
    variant: variant ?? this.variant,
    size: size ?? this.size,
    disabled: disabled ?? this.disabled,
    loading: loading ?? this.loading,
    tooltip: tooltip ?? this.tooltip,
  );
}