-
Notifications
You must be signed in to change notification settings - Fork 87
Closed
Description
I tried many approach, the image still stays when I confirm delete on dialog.
deleteDialogBuilder: (context, onConfirm) {
return showDialog<void>(
context: context,
barrierDismissible: false, // User must tap button to dismiss dialog
builder: (BuildContext dialogContext) {
return AlertDialog(
title: const Text('Delete File'),
content:
const Text('Are you sure you want to delete this file?!!'),
actions: <Widget>[
TextButton(
child: const Text('Cancel'),
onPressed: () {
Navigator.of(dialogContext).pop(); // Dismiss the dialog
},
),
TextButton(
child: const Text('Delete'),
onPressed: () {
// Call the onDelete callback
onConfirm(SelectedFile.image());
Navigator.of(dialogContext).pop(); // Dismiss the dialog
},
),
],
);
},
);
},
UsamaKarim
Metadata
Metadata
Assignees
Labels
No labels
