copyWith method

DrawerProps copyWith({
  1. bool? isOpen,
  2. void onClose()?,
  3. DrawerPosition? position,
  4. DrawerSize? size,
  5. Widget? child,
  6. Widget? header,
  7. Widget? footer,
  8. bool? showBackdrop,
  9. bool? closeOnBackdropClick,
  10. bool? showCloseButton,
  11. String? width,
  12. String? height,
})

Implementation

DrawerProps copyWith({
  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,
}) {
  return DrawerProps(
    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,
  );
}