Drawer constructor
Drawer(
- BuildContext context, {
- Key? key,
- bool autoFocus = true,
- void afterVisibleChange(
- bool visible
- Widget? child,
- bool closable = true,
- Widget? closeIcon,
- bool destroyOnClose = false,
- Widget? extra,
- bool forceRender = false,
- double? height,
- bool keyboard = true,
- bool mask = true,
- bool maskClosable = true,
- Placement placement = Placement.right,
- Size size = Size.medium,
- Widget? title,
- double? width,
- 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);
}