copyWith method

DrawerProps copyWith({
  1. String? id,
  2. bool? isOpen,
  3. void onClose()?,
  4. DrawerPosition? position,
  5. DrawerSize? size,
  6. Widget? child,
  7. Widget? header,
  8. Widget? footer,
  9. bool? showBackdrop,
  10. bool? closeOnBackdropClick,
  11. bool? showCloseButton,
  12. String? width,
  13. String? height,
  14. bool? escapeCloses,
  15. bool? focusTrap,
  16. bool? restoreFocus,
  17. ArcaneStyleData? styles,
  18. ArcaneDecoration? decoration,
})

Implementation

DrawerProps copyWith({
  String? id,
  bool? isOpen,
  void Function()? onClose,
  DrawerPosition? position,
  DrawerSize? size,
  Widget? child,
  Widget? header,
  Widget? footer,
  bool? showBackdrop,
  bool? closeOnBackdropClick,
  bool? showCloseButton,
  String? width,
  String? height,
  bool? escapeCloses,
  bool? focusTrap,
  bool? restoreFocus,
  ArcaneStyleData? styles,
  ArcaneDecoration? decoration,
}) {
  return DrawerProps(
    id: id ?? this.id,
    isOpen: isOpen ?? this.isOpen,
    onClose: onClose ?? this.onClose,
    position: position ?? this.position,
    size: size ?? this.size,
    child: child ?? this.child,
    header: header ?? this.header,
    footer: footer ?? this.footer,
    showBackdrop: showBackdrop ?? this.showBackdrop,
    closeOnBackdropClick: closeOnBackdropClick ?? this.closeOnBackdropClick,
    showCloseButton: showCloseButton ?? this.showCloseButton,
    width: width ?? this.width,
    height: height ?? this.height,
    escapeCloses: escapeCloses ?? this.escapeCloses,
    focusTrap: focusTrap ?? this.focusTrap,
    restoreFocus: restoreFocus ?? this.restoreFocus,
    styles: styles ?? this.styles,
    decoration: decoration ?? this.decoration,
  );
}