Drawer constructor

Drawer(
  1. BuildContext context, {
  2. Key? key,
  3. bool autoFocus = true,
  4. void afterVisibleChange(
    1. bool visible
    )?,
  5. Widget? child,
  6. bool closable = true,
  7. Widget? closeIcon,
  8. bool destroyOnClose = false,
  9. Widget? extra,
  10. Widget? footer,
  11. bool forceRender = false,
  12. double? height,
  13. bool keyboard = true,
  14. bool mask = true,
  15. bool maskClosable = true,
  16. Placement placement = Placement.right,
  17. Size size = Size.medium,
  18. Widget? title,
  19. double? width,
  20. void onClose()?,
})

Implementation

Drawer(
  BuildContext context, {
  this.key,
  this.autoFocus = true,
  this.afterVisibleChange,
  this.child,
  this.closable = true,
  this.closeIcon,
  this.destroyOnClose = false,
  this.extra,
  this.footer,
  this.forceRender = false,
  this.height,
  this.keyboard = true,
  this.mask = true,
  this.maskClosable = true,
  this.placement = Placement.right,
  this.size = Size.medium,
  this.title,
  this.width,
  this.onClose,
}) {
  _state = Overlay.of(context);
  _entry = OverlayEntry(
    builder: (_) => _Drawer(
      closable: closable,
      closeIcon: closeIcon,
      extra: extra,
      footer: footer,
      height: height,
      keyboard: keyboard,
      mask: mask,
      maskClosable: maskClosable,
      placement: placement,
      size: size,
      title: title,
      width: width,
      onClose: _handleClose,
      child: child,
    ),
  );
  _state?.insert(_entry!);
  afterVisibleChange?.call(true);
}