showDeleteConfirmation static method

Future<bool?> showDeleteConfirmation(
  1. BuildContext context, {
  2. String? itemName,
})

Shows a delete confirmation dialog

Returns true if user confirmed deletion, false if cancelled

Implementation

static Future<bool?> showDeleteConfirmation(
  BuildContext context, {
  String? itemName,
}) {
  final title = 'Delete ${itemName ?? 'Item'}?';
  final message = itemName != null
      ? 'Are you sure you want to delete "$itemName"? This action cannot be undone.'
      : 'Are you sure you want to delete this item? This action cannot be undone.';

  /// Show the dialog
  return SavePointsDialog.show(
    context,
    title: title,
    message: message,
    icon: Icons.delete_rounded,
    iconColor: Colors.red,
    confirmText: 'Delete',
    cancelText: 'Cancel',
    showCancelButton: true,
    confirmButtonColor: Colors.red,
  );
}