alert function
- BuildContext context,
- String msg, [
- String title = 'Notice'
Show an alert dialog.
Implementation
Future<void> alert(
BuildContext context,
String msg, [
String title = 'Notice',
]) async {
await showDialog(
context: context,
builder: (context) => AlertDialog(
title: Text(title),
content: Text(msg),
actions: [
ElevatedButton(
onPressed: () {
Navigator.pop(context);
},
child: const Text('OK'),
),
],
),
);
}