copyWith method

ZetaIconButton copyWith({
  1. ZetaButtonType? type,
  2. ZetaWidgetBorder? borderType,
  3. ZetaWidgetSize? size,
  4. IconData? icon,
  5. String? semanticLabel,
  6. VoidCallback? onPressed,
  7. Key? key,
  8. bool? rounded,
})

Creates a copy of this button but with the given fields replaced by the new values.

Implementation

ZetaIconButton copyWith({
  ZetaButtonType? type,
  ZetaWidgetBorder? borderType,
  ZetaWidgetSize? size,
  IconData? icon,
  String? semanticLabel,
  VoidCallback? onPressed,
  Key? key,
  bool? rounded,
}) {
  return ZetaIconButton(
    key: key ?? this.key,
    rounded: rounded ?? this.rounded,
    onPressed: onPressed ?? this.onPressed,
    borderType: borderType ?? this.borderType,
    type: type ?? this.type,
    size: size ?? this.size,
    icon: icon ?? this.icon,
    semanticLabel: semanticLabel ?? this.semanticLabel,
  );
}