showAlert static method
Show an alert dialog with a title
and message
.
Implementation
static void showAlert(String title, String message) {
showDialog(
context: Get.context!,
builder: (BuildContext context) {
return AlertDialog(
title: Text(title),
content: Text(message),
actions: [
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: const Text('OK'),
),
],
);
},
);
}