popupDialog method
Widget
popupDialog(
- BuildContext context,
- String title,
- String text,
- dynamic button1, {
- dynamic button2,
Implementation
Widget popupDialog(BuildContext context, String title, String text, button1,
{button2}) {
return AlertDialog(
backgroundColor: Colors.white,
title: Text(
title,
style: Theme.of(context).textTheme.bodyLarge,
),
content: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(text, style: Theme.of(context).textTheme.bodySmall),
],
),
actions: <Widget>[
if (button1 != null) button1,
if (button2 != null) button2
],
);
}