showAlertDialog static method
dynamic
showAlertDialog({
- required BuildContext context,
- required String message,
- void onPressed()?,
Implementation
static showAlertDialog({required BuildContext context, required String message, void Function()? onPressed}) async {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
contentTextStyle: TextStyles.popupText,
content: Text(message),
actions: [
TextButton(
onPressed: onPressed ?? () => Navigator.of(context).pop(),
child: const Text('OK'),
)
],
);
});
}