popupWidget static method
Widget
popupWidget({
- required BuildContext context,
- String? title,
- Widget? titleWidget,
- IconData? icon,
- dynamic body,
- dynamic button1,
- dynamic button2,
- dynamic button3,
- dynamic button4,
- dynamic key,
Implementation
static Widget popupWidget(
{required BuildContext context,
String? title,
Widget? titleWidget,
IconData? icon,
body,
button1,
button2,
button3,
button4,
key}) {
return AlertDialog(
key: key,
titlePadding:
EdgeInsets.zero, //const EdgeInsets.fromLTRB(4.0, 14, 5.0, 3),
contentPadding: const EdgeInsets.all(4.0),
actionsPadding: const EdgeInsets.all(8.0),
insetPadding: const EdgeInsets.all(8.0),
backgroundColor: Theme.of(context).colorScheme.surfaceContainer,
title: titleWidget ??
(title != null
? titleBar(
context: context, icon: icon, title: title, buttons: null)
: null),
content: body,
actions: <Widget>[
if (button1 != null) button1,
if (button2 != null) button2,
if (button3 != null) button3,
if (button4 != null) button4
],
);
}