copyWith method

SheetProps copyWith({
  1. String? id,
  2. bool? isOpen,
  3. Widget? child,
  4. SheetPosition? position,
  5. SheetSizeVariant? size,
  6. void onClose()?,
  7. bool? showCloseButton,
  8. String? title,
  9. String? description,
  10. Widget? header,
  11. Widget? footer,
  12. bool? showBackdrop,
  13. bool? closeOnBackdropClick,
  14. bool? showDragHandle,
  15. String? maxWidth,
  16. bool? escapeCloses,
  17. bool? focusTrap,
  18. bool? restoreFocus,
})

Implementation

SheetProps copyWith({
  String? id,
  bool? isOpen,
  Widget? child,
  SheetPosition? position,
  SheetSizeVariant? size,
  void Function()? onClose,
  bool? showCloseButton,
  String? title,
  String? description,
  Widget? header,
  Widget? footer,
  bool? showBackdrop,
  bool? closeOnBackdropClick,
  bool? showDragHandle,
  String? maxWidth,
  bool? escapeCloses,
  bool? focusTrap,
  bool? restoreFocus,
}) {
  return SheetProps(
    id: id ?? this.id,
    isOpen: isOpen ?? this.isOpen,
    child: child ?? this.child,
    position: position ?? this.position,
    size: size ?? this.size,
    onClose: onClose ?? this.onClose,
    showCloseButton: showCloseButton ?? this.showCloseButton,
    title: title ?? this.title,
    description: description ?? this.description,
    header: header ?? this.header,
    footer: footer ?? this.footer,
    showBackdrop: showBackdrop ?? this.showBackdrop,
    closeOnBackdropClick: closeOnBackdropClick ?? this.closeOnBackdropClick,
    showDragHandle: showDragHandle ?? this.showDragHandle,
    maxWidth: maxWidth ?? this.maxWidth,
    escapeCloses: escapeCloses ?? this.escapeCloses,
    focusTrap: focusTrap ?? this.focusTrap,
    restoreFocus: restoreFocus ?? this.restoreFocus,
  );
}