showAlertDialog function
- BuildContext context, {
- required String title,
- required String message,
- String? confirmLabel,
Shows an alert dialog with the given title
and message
to the user.
The dialog will have an OK button to dismiss it.
Implementation
Future<void> showAlertDialog(
BuildContext context, {
required String title,
required String message,
String? confirmLabel,
}) async {
await showGenericDialog<void>(
context,
title: title,
content: Text(message),
actions: [
PrimaryDialogAction(
label: confirmLabel ?? 'OK',
onPressed: Navigator.pop,
),
],
);
}