show static method
Shows a ConfirmDialogWidget and resolves to the user's choice.
Returns true if confirmed, false if cancelled, null if the
dialog was dismissed by tapping the barrier or pressing back.
Implementation
static Future<bool?> show(
BuildContext context, {
required String title,
required String message,
String confirmLabel = 'Confirm',
String cancelLabel = 'Cancel',
bool destructive = false,
bool barrierDismissible = true,
}) {
return showDialog<bool>(
context: context,
barrierDismissible: barrierDismissible,
builder: (_) => ConfirmDialogWidget(
title: title,
message: message,
confirmLabel: confirmLabel,
cancelLabel: cancelLabel,
destructive: destructive,
),
);
}