copyWith method

ZetaButton copyWith(
  1. {String? label,
  2. VoidCallback? onPressed,
  3. ZetaButtonType? type,
  4. ZetaWidgetSize? size,
  5. ZetaWidgetBorder? borderType,
  6. IconData? leadingIcon,
  7. IconData? trailingIcon,
  8. Key? key}
)

Creates a clone.

Implementation

ZetaButton copyWith({
  String? label,
  VoidCallback? onPressed,
  ZetaButtonType? type,
  ZetaWidgetSize? size,
  ZetaWidgetBorder? borderType,
  IconData? leadingIcon,
  IconData? trailingIcon,
  Key? key,
}) {
  return ZetaButton(
    label: label ?? this.label,
    onPressed: onPressed ?? this.onPressed,
    type: type ?? this.type,
    size: size ?? this.size,
    borderType: borderType ?? this.borderType,
    leadingIcon: leadingIcon ?? this.leadingIcon,
    trailingIcon: trailingIcon ?? this.trailingIcon,
    key: key ?? this.key,
  );
}