expiredPopup static method
Future<void>
expiredPopup(
{
})
Implementation
static Future<void> expiredPopup(
{required BuildContext context,
Function? beforePopup,
required String title,
required String msg,
required String buttonTestKey,
required String buttonName,
required Function() onButton}) async {
if (_isExpiredShowing) return;
_isExpiredShowing = true;
if (beforePopup != null) beforePopup();
await showDialog(
context: context,
barrierDismissible: false,
builder: (context) {
return AlertDialog(
title: Text(title,
textAlign: TextAlign.left,
style: kTitleStyleDark.copyWith(fontWeight: FontWeight.bold)),
content: SingleChildScrollView(
child: ListBody(
children: <Widget>[
Text(
msg,
textAlign: TextAlign.left,
style: kTextStyle14o80,
),
],
),
),
actions: <Widget>[
TextButton(
key: Key(buttonTestKey),
child: Text(
buttonName,
style: kLinkBtn,
),
onPressed: () {
_isExpiredShowing = false;
onButton();
},
),
],
);
},
);
}