showEDrawer function
Future<void>
showEDrawer({
- required BuildContext context,
- String? title,
- Widget? content,
- bool showClose = true,
- double width = 420,
- double? height,
- EdgeInsets? padding,
- String direction = 'rtl',
- bool modal = true,
- bool lockScroll = true,
- bool closeOnClickModal = true,
- bool closeOnPressEscape = true,
- Widget? customHeader,
- Color? backgroundColor,
- double? size,
Shows a drawer with the given parameters
Implementation
Future<void> showEDrawer({
required BuildContext context,
String? title,
Widget? content,
bool showClose = true,
double width = 420,
double? height,
EdgeInsets? padding,
String direction = 'rtl',
bool modal = true,
bool lockScroll = true,
bool closeOnClickModal = true,
bool closeOnPressEscape = true,
Widget? customHeader,
Color? backgroundColor,
double? size,
}) {
bool isVisible = true;
void close() {
if (isVisible) {
isVisible = false;
Navigator.of(context).pop();
}
}
return showDialog(
context: context,
barrierColor: Colors.transparent,
builder: (context) => EDrawer(
title: title,
content: content,
visible: true,
onClose: close,
showClose: showClose,
width: width,
height: height,
padding: padding,
direction: direction,
modal: modal,
lockScroll: lockScroll,
closeOnClickModal: closeOnClickModal,
closeOnPressEscape: closeOnPressEscape,
customHeader: customHeader,
backgroundColor: backgroundColor,
size: size,
),
);
}