show static method
Shows a CLConfirmationDialog and returns whether the user confirmed.
Resolves to false if the dialog is dismissed without an explicit
confirmation (e.g. tapping outside or pressing back).
Implementation
static Future<bool> show(
BuildContext context, {
required String title,
required String message,
String confirmLabel = 'Conferma',
String cancelLabel = 'Annulla',
bool isDestructive = false,
IconData? icon,
}) async {
final result = await showDialog<bool>(
context: context,
builder: (_) => CLConfirmationDialog(
title: title,
message: message,
confirmLabel: confirmLabel,
cancelLabel: cancelLabel,
isDestructive: isDestructive,
icon: icon,
),
);
return result ?? false;
}