showDeleteDialog static method
Show a confirmation dialog then delete if confirmed.
Returns true if deleted, false if cancelled.
final deleted = await CloudMedia.showDeleteDialog(context, item);
Implementation
static Future<bool> showDeleteDialog(
BuildContext context,
CloudMediaItem item,
) async {
final confirmed = await ConfirmationDialog.show(
context,
title: 'Delete media?',
message: '"${item.fileName}" will be permanently removed.',
confirmText: 'Delete',
confirmColor: Colors.red,
);
if (confirmed != true) return false;
await delete(item.id);
return true;
}