showAlertDialog static method
void
showAlertDialog({
- required BuildContext context,
- List<
Widget> ? titleRowWidgets, - Widget? content,
- List<
Widget> ? actions, - Color? barrierColor,
- Color? backgroundColor,
- bool barrierDismissible = true,
- EdgeInsets? insetPadding,
- dynamic onDismiss,
Show alert dialog with various components
Implementation
static void showAlertDialog(
{required BuildContext context,
List<Widget>? titleRowWidgets,
Widget? content,
List<Widget>? actions,
Color? barrierColor,
Color? backgroundColor,
bool barrierDismissible = true,
EdgeInsets? insetPadding,
onDismiss}) {
if (titleRowWidgets == null) titleRowWidgets = [];
showDialog(
context: context,
barrierDismissible: barrierDismissible,
barrierColor: barrierColor,
builder: (context) => new AlertDialog(
title: Row(children: titleRowWidgets!),
content: content,
actions: actions,
backgroundColor: backgroundColor,
insetPadding: insetPadding,
)).then((value) => {
if (onDismiss != null)
onDismiss()
else
Navigator.of(context).pop(false)
});
}