yShowDialog function
void
yShowDialog({
- required dynamic alertBuilder(
- BuildContext pageContext,
- BuildContext? dialogContext
- bool dismissible = true,
- BuildContext? context,
Implementation
void yShowDialog({required Function(BuildContext pageContext, BuildContext? dialogContext) alertBuilder, bool dismissible = true, BuildContext? context}) {
showDialog(
context: context ?? yPages.last.context,
barrierDismissible: dismissible,
builder: (dialogContext) {
if (!dismissible) _dialogContext = dialogContext;
return WillPopScope(
onWillPop: () => Future.value(dismissible),
child: alertBuilder(context ?? yPages.last.context, dismissible ? dialogContext : null),
);
},
);
}