Browse Source

Used action sheet at places

ashilkn 2 years ago
parent
commit
02be80dce5
1 changed files with 4 additions and 6 deletions
  1. 4 6
      lib/utils/delete_file_util.dart

+ 4 - 6
lib/utils/delete_file_util.dart

@@ -247,7 +247,7 @@ Future<void> deleteFilesOnDeviceOnly(
 
 
 Future<bool> deleteFromTrash(BuildContext context, List<File> files) async {
 Future<bool> deleteFromTrash(BuildContext context, List<File> files) async {
   bool didDeletionStart = false;
   bool didDeletionStart = false;
-  final result = await showChoiceDialog(
+  final result = await showChoiceActionSheet(
     context,
     context,
     title: "Permanently delete?",
     title: "Permanently delete?",
     body: "This action cannot be undone",
     body: "This action cannot be undone",
@@ -282,7 +282,7 @@ Future<bool> deleteFromTrash(BuildContext context, List<File> files) async {
 }
 }
 
 
 Future<bool> emptyTrash(BuildContext context) async {
 Future<bool> emptyTrash(BuildContext context) async {
-  final result = await showChoiceDialog(
+  final result = await showChoiceActionSheet(
     context,
     context,
     title: "Empty trash?",
     title: "Empty trash?",
     body:
     body:
@@ -467,9 +467,9 @@ Future<List<String>> _tryDeleteSharedMediaFiles(List<String> localIDs) {
 }
 }
 
 
 Future<bool> shouldProceedWithDeletion(BuildContext context) async {
 Future<bool> shouldProceedWithDeletion(BuildContext context) async {
-  final choice = await showChoiceDialog(
+  final choice = await showChoiceActionSheet(
     context,
     context,
-    title: "Are you sure?",
+    title: "Permanently delete from device?",
     body:
     body:
         "Some of the files you are trying to delete are only available on your device and cannot be recovered if deleted",
         "Some of the files you are trying to delete are only available on your device and cannot be recovered if deleted",
     firstButtonLabel: "Delete",
     firstButtonLabel: "Delete",
@@ -567,8 +567,6 @@ Future<void> showDeleteSheet(
             context,
             context,
             selectedFiles.files.toList(),
             selectedFiles.files.toList(),
           );
           );
-          // Navigator.of(context, rootNavigator: true).pop();
-          // widget.onFileRemoved(file);
         },
         },
       ),
       ),
     );
     );