Browse Source

no message

xiaobai 3 months ago
parent
commit
20f7d2a7d2

+ 0 - 1
lib/module/user_service.dart

@@ -1,5 +1,4 @@
 
-import 'package:adaptive_dialog/adaptive_dialog.dart';
 import 'package:flutter_easyloading/flutter_easyloading.dart';
 import 'package:get/get.dart';
 import 'package:get/route_manager.dart';

+ 183 - 90
lib/pages/footprint/blank_journal/page/blank_journal_page.dart

@@ -1,7 +1,7 @@
 
 import 'dart:io';
 
-import 'package:adaptive_dialog/adaptive_dialog.dart';
+// import 'package:adaptive_dialog/adaptive_dialog.dart';
 import 'package:cached_network_image/cached_network_image.dart';
 import 'package:device_info_plus/device_info_plus.dart';
 import 'package:flutter/material.dart';
@@ -12,6 +12,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
 import 'package:get/get.dart';
 import 'package:iquokka/pages/footprint/blank_journal/controller/blank_journal_ctrl.dart';
 import 'package:iquokka/utils/base_app_bar.dart';
+import 'package:iquokka/utils/bottom_sheet_dialog.dart';
 import 'package:permission_handler/permission_handler.dart';
 import 'package:photo_view/photo_view.dart';
 import 'package:photo_view/photo_view_gallery.dart';
@@ -23,6 +24,7 @@ import '../../../../common/AC.dart';
 import '../../../../gen_a/A.dart';
 import '../../../../utils/file_utils.dart';
 import '../../../../utils/hex_color.dart';
+import '../../../../utils/modal_action_sheet_dialog.dart';
 import '../../../../utils/oss_utils.dart';
 import '../../../../utils/picker_img_utils.dart';
 import '../../../../utils/time_util.dart';
@@ -229,19 +231,28 @@ class BlankJournalPage extends GetView<BlankJournalCtrl> {
                                                           onTap: () async{
                                                             controller.titleFocusNode.unfocus();
                                                             controller.contentFocusNode.unfocus();
-                                                            final result = await showOkCancelAlertDialog(
-                                                              context: context,
-                                                              okLabel: "删除照片".tr,
-                                                              cancelLabel: "取消".tr,
-                                                              isDestructiveAction: true,
-                                                              style: AdaptiveStyle.iOS,
-                                                              useActionSheetForIOS: true,
+                                                            // final result = await showOkCancelAlertDialog(
+                                                            //   context: context,
+                                                            //   okLabel: "删除照片".tr,
+                                                            //   cancelLabel: "取消".tr,
+                                                            //   isDestructiveAction: true,
+                                                            //   style: AdaptiveStyle.iOS,
+                                                            //   useActionSheetForIOS: true,
+                                                            // );
+                                                            // if (result == OkCancelResult.ok) {
+                                                            //   _.imageList.removeAt(index);
+                                                            //   _.update(["text", "photoButton"]);
+                                                            //   //controller.saveImageToDraft();
+                                                            // }
+
+                                                            BottomSheetDialog.showSheet(
+                                                              sureText: "删除照片".tr,
+                                                              cancelText: "取消".tr,
+                                                              sureHandle: (){
+                                                                _.imageList.removeAt(index);
+                                                                _.update(["text", "photoButton"]);
+                                                              }
                                                             );
-                                                            if (result == OkCancelResult.ok) {
-                                                              _.imageList.removeAt(index);
-                                                              _.update(["text", "photoButton"]);
-                                                              //controller.saveImageToDraft();
-                                                            }
                                                           },
                                                         ),
                                                       )
@@ -436,29 +447,48 @@ class BlankJournalPage extends GetView<BlankJournalCtrl> {
                       ),
                     ),
                     onTap: () async{
-                      final result = await showOkCancelAlertDialog(
-                        context: Get.context!,
-                        okLabel: "删除照片".tr,
-                        cancelLabel: "取消".tr,
-                        isDestructiveAction: true,
-                        style: AdaptiveStyle.iOS,
-                        useActionSheetForIOS: true,
-                      );
-                      if (result == OkCancelResult.ok) {
-                        controller.imageList.removeAt(flagIndex);
-                        if (controller.imageList.isNotEmpty) {
-                          if (flagIndex >= controller.imageList.length) {
-                            flagIndex -= 1;
-                            pageController = PageController(initialPage: flagIndex);
+                      // final result = await showOkCancelAlertDialog(
+                      //   context: Get.context!,
+                      //   okLabel: "删除照片".tr,
+                      //   cancelLabel: "取消".tr,
+                      //   isDestructiveAction: true,
+                      //   style: AdaptiveStyle.iOS,
+                      //   useActionSheetForIOS: true,
+                      // );
+                      // if (result == OkCancelResult.ok) {
+                      //   controller.imageList.removeAt(flagIndex);
+                      //   if (controller.imageList.isNotEmpty) {
+                      //     if (flagIndex >= controller.imageList.length) {
+                      //       flagIndex -= 1;
+                      //       pageController = PageController(initialPage: flagIndex);
+                      //     }
+                      //     controller.update(["text", "photoButton", "big_photo"]);
+                      //   }
+                      //   else {
+                      //     Get.back();
+                      //     controller.update(["text", "photoButton"]);
+                      //   }
+                      //   //controller.saveImageToDraft();
+                      // }
+
+                      BottomSheetDialog.showSheet(
+                          sureText: "删除照片".tr,
+                          cancelText: "取消".tr,
+                          sureHandle: (){
+                            controller.imageList.removeAt(flagIndex);
+                            if (controller.imageList.isNotEmpty) {
+                              if (flagIndex >= controller.imageList.length) {
+                                flagIndex -= 1;
+                                pageController = PageController(initialPage: flagIndex);
+                              }
+                              controller.update(["text", "photoButton", "big_photo"]);
+                            }
+                            else {
+                              Get.back();
+                              controller.update(["text", "photoButton"]);
+                            }
                           }
-                          controller.update(["text", "photoButton", "big_photo"]);
-                        }
-                        else {
-                          Get.back();
-                          controller.update(["text", "photoButton"]);
-                        }
-                        //controller.saveImageToDraft();
-                      }
+                      );
                     },
                   ),
                 ],
@@ -486,68 +516,131 @@ class BlankJournalPage extends GetView<BlankJournalCtrl> {
       return;
     }
 
-    final result = await showModalActionSheet<int>(
-        context: Get.context!,
-        cancelLabel: "取消".tr,
-        style: AdaptiveStyle.iOS,
-        actions: [
-          SheetAction(key: 0, label: "拍照".tr),
-          SheetAction(key: 1, label: "从相册中选取".tr),
-        ]
-    );
-    if (result == 0){ //拍照
-      if (UniversalPlatform.isAndroid) {
-        PermissionStatus camerasStatus = await Permission.camera.status;
-        if (camerasStatus.isGranted) {
-          _takePhone();
+    // final result = await showModalActionSheet<int>(
+    //     context: Get.context!,
+    //     cancelLabel: "取消".tr,
+    //     style: AdaptiveStyle.iOS,
+    //     actions: [
+    //       SheetAction(key: 0, label: "拍照".tr),
+    //       SheetAction(key: 1, label: "从相册中选取".tr),
+    //     ]
+    // );
+    // if (result == 0){ //拍照
+    //   if (UniversalPlatform.isAndroid) {
+    //     PermissionStatus camerasStatus = await Permission.camera.status;
+    //     if (camerasStatus.isGranted) {
+    //       _takePhone();
+    //     }
+    //     else {
+    //       TipsDialog.showDialog(
+    //           title: "温馨提示".tr,
+    //           content: "心境奇旅将使用您的相机权限拍照上传心情记录图片".tr,
+    //           cancelText: "取消".tr,
+    //           sureText: "确定".tr,
+    //           sureHandle: (){
+    //             _takePhone();
+    //           }
+    //       );
+    //     }
+    //   }
+    //   else {
+    //     _takePhone();
+    //   }
+    // }
+    // else if (result == 1) { //从相册中选取
+    //   if (UniversalPlatform.isAndroid) {
+    //     AndroidDeviceInfo androidInfo = await DeviceInfoPlugin().androidInfo;
+    //     String androidBrand = androidInfo.brand.toLowerCase();
+    //     if (androidBrand == "huawei" || androidBrand == "honor") {
+    //       if (await Permission.storage.status.isGranted) {
+    //         _selectPhotosInPhotoAlbum();
+    //       }
+    //       else {
+    //         TipsDialog.showDialog(
+    //             title: "温馨提示".tr,
+    //             content: "心境奇旅将使用您的相册存储权限以选取相册中的图片".tr,
+    //             cancelText: "取消".tr,
+    //             sureText: "确定".tr,
+    //             cancelHandle: (){
+    //               return false;
+    //             },
+    //             sureHandle: () async {
+    //               _selectPhotosInPhotoAlbum();
+    //             }
+    //         );
+    //       }
+    //     }
+    //     else {
+    //       _selectPhotosInPhotoAlbum();
+    //     }
+    //   }
+    //   else {
+    //     _selectPhotosInPhotoAlbum();
+    //   }
+    // }
+
+    ModalActionSheetDialog.showSheet(
+      cancelText: "取消".tr,
+      actions: [
+        ActionSheetModel(id: 0, name: "拍照".tr),
+        ActionSheetModel(id: 1, name: "从相册中选取".tr)
+      ],
+      actionHandle: (result) async {
+        if (result == 0){ //拍照
+          if (UniversalPlatform.isAndroid) {
+            PermissionStatus camerasStatus = await Permission.camera.status;
+            if (camerasStatus.isGranted) {
+              _takePhone();
+            }
+            else {
+              TipsDialog.showDialog(
+                  title: "温馨提示".tr,
+                  content: "心境奇旅将使用您的相机权限拍照上传心情记录图片".tr,
+                  cancelText: "取消".tr,
+                  sureText: "确定".tr,
+                  sureHandle: (){
+                    _takePhone();
+                  }
+              );
+            }
+          }
+          else {
+            _takePhone();
+          }
         }
-        else {
-          TipsDialog.showDialog(
-              title: "温馨提示".tr,
-              content: "心境奇旅将使用您的相机权限拍照上传心情记录图片".tr,
-              cancelText: "取消".tr,
-              sureText: "确定".tr,
-              sureHandle: (){
-                _takePhone();
+        else if (result == 1) { //从相册中选取
+          if (UniversalPlatform.isAndroid) {
+            AndroidDeviceInfo androidInfo = await DeviceInfoPlugin().androidInfo;
+            String androidBrand = androidInfo.brand.toLowerCase();
+            if (androidBrand == "huawei" || androidBrand == "honor") {
+              if (await Permission.storage.status.isGranted) {
+                _selectPhotosInPhotoAlbum();
               }
-          );
-        }
-      }
-      else {
-        _takePhone();
-      }
-    }
-    else if (result == 1) { //从相册中选取
-      if (UniversalPlatform.isAndroid) {
-        AndroidDeviceInfo androidInfo = await DeviceInfoPlugin().androidInfo;
-        String androidBrand = androidInfo.brand.toLowerCase();
-        if (androidBrand == "huawei" || androidBrand == "honor") {
-          if (await Permission.storage.status.isGranted) {
-            _selectPhotosInPhotoAlbum();
+              else {
+                TipsDialog.showDialog(
+                    title: "温馨提示".tr,
+                    content: "心境奇旅将使用您的相册存储权限以选取相册中的图片".tr,
+                    cancelText: "取消".tr,
+                    sureText: "确定".tr,
+                    cancelHandle: (){
+                      return false;
+                    },
+                    sureHandle: () async {
+                      _selectPhotosInPhotoAlbum();
+                    }
+                );
+              }
+            }
+            else {
+              _selectPhotosInPhotoAlbum();
+            }
           }
           else {
-            TipsDialog.showDialog(
-                title: "温馨提示".tr,
-                content: "心境奇旅将使用您的相册存储权限以选取相册中的图片".tr,
-                cancelText: "取消".tr,
-                sureText: "确定".tr,
-                cancelHandle: (){
-                  return false;
-                },
-                sureHandle: () async {
-                  _selectPhotosInPhotoAlbum();
-                }
-            );
+            _selectPhotosInPhotoAlbum();
           }
         }
-        else {
-          _selectPhotosInPhotoAlbum();
-        }
       }
-      else {
-        _selectPhotosInPhotoAlbum();
-      }
-    }
+    );
   }
 
   // 拍照

+ 1 - 1
lib/pages/my/lately_record/page/record_detail_page.dart

@@ -4,7 +4,7 @@ import 'dart:async';
 import 'dart:convert';
 import 'dart:io';
 
-import 'package:adaptive_dialog/adaptive_dialog.dart';
+// import 'package:adaptive_dialog/adaptive_dialog.dart';
 import 'package:cached_network_image/cached_network_image.dart';
 import 'package:device_info_plus/device_info_plus.dart';
 import 'package:flutter/material.dart';

+ 76 - 58
lib/pages/my/main/page/avatar_big_page.dart

@@ -1,7 +1,7 @@
 
 import 'dart:io';
 
-import 'package:adaptive_dialog/adaptive_dialog.dart';
+// import 'package:adaptive_dialog/adaptive_dialog.dart';
 import 'package:cached_network_image/cached_network_image.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter_easyloading/flutter_easyloading.dart';
@@ -23,6 +23,7 @@ import '../../../../net/http_url.dart';
 import '../../../../net/http_utils.dart';
 import '../../../../utils/app_event.dart';
 import '../../../../utils/base_app_bar.dart';
+import '../../../../utils/modal_action_sheet_dialog.dart';
 import '../../../../utils/oss_utils.dart';
 import '../../../../utils/picker_img_utils.dart';
 import '../../../../utils/tips_dialog.dart';
@@ -74,67 +75,84 @@ class _AvatarBigState extends State<AvatarBigPage> {
                 color: HexColor("#ffffff")
             ),
             onPressed: () async{
-              final result = await showModalActionSheet<int>(
-                  context: context,
-                  cancelLabel: "取消".tr,
-                  style: AdaptiveStyle.iOS,
-                  actions: [
-                    SheetAction(key: 0, label: "拍照".tr),
-                    SheetAction(key: 1, label: "从相册中选取".tr),
-                  ]
-              );
-              if (result != null) {
-                if (result == 0){ //拍照
-                  if (UniversalPlatform.isAndroid) {
-                    PermissionStatus camerasStatus = await Permission.camera.status;
-                    print("camerasStatus === camerasStatus");
-                    print(camerasStatus);
-                    if (camerasStatus.isGranted) {
-                      _takePhone();
+              // final result = await showModalActionSheet<int>(
+              //     context: context,
+              //     cancelLabel: "取消".tr,
+              //     style: AdaptiveStyle.iOS,
+              //     actions: [
+              //       SheetAction(key: 0, label: "拍照".tr),
+              //       SheetAction(key: 1, label: "从相册中选取".tr),
+              //     ]
+              // );
+              // if (result != null) {
+              //   if (result == 0){ //拍照
+              //     if (UniversalPlatform.isAndroid) {
+              //       PermissionStatus camerasStatus = await Permission.camera.status;
+              //       print("camerasStatus === camerasStatus");
+              //       print(camerasStatus);
+              //       if (camerasStatus.isGranted) {
+              //         _takePhone();
+              //       }
+              //       else {
+              //         TipsDialog.showDialog(
+              //             title: "温馨提示".tr,
+              //             content: "心境奇旅将使用您的相机权限以拍照上传头像".tr,
+              //             cancelText: "取消".tr,
+              //             sureText: "确定".tr,
+              //             sureHandle: (){
+              //               _takePhone();
+              //             }
+              //         );
+              //       }
+              //     }
+              //     else {
+              //       _takePhone();
+              //     }
+              //   }
+              //   else if (result == 1) { //相册
+              //     _selectInAlbum();
+              //   }
+              // }
+
+              ModalActionSheetDialog.showSheet(
+                cancelText: "取消".tr,
+                actions: [
+                  ActionSheetModel(id: 0, name: "拍照".tr),
+                  ActionSheetModel(id: 1, name: "从相册中选取".tr)
+                ],
+                actionHandle: (result) async {
+                  if (result != null) {
+                    if (result == 0){ //拍照
+                      if (UniversalPlatform.isAndroid) {
+                        PermissionStatus camerasStatus = await Permission.camera.status;
+                        print("camerasStatus === camerasStatus");
+                        print(camerasStatus);
+                        if (camerasStatus.isGranted) {
+                          _takePhone();
+                        }
+                        else {
+                          TipsDialog.showDialog(
+                              title: "温馨提示".tr,
+                              content: "心境奇旅将使用您的相机权限以拍照上传头像".tr,
+                              cancelText: "取消".tr,
+                              sureText: "确定".tr,
+                              sureHandle: (){
+                                _takePhone();
+                              }
+                          );
+                        }
+                      }
+                      else {
+                        _takePhone();
+                      }
                     }
-                    else {
-                      TipsDialog.showDialog(
-                          title: "温馨提示".tr,
-                          content: "心境奇旅将使用您的相机权限以拍照上传头像".tr,
-                          cancelText: "取消".tr,
-                          sureText: "确定".tr,
-                          sureHandle: (){
-                            _takePhone();
-                          }
-                      );
+                    else if (result == 1) { //相册
+                      _selectInAlbum();
                     }
                   }
-                  else {
-                    _takePhone();
-                  }
-                }
-                else if (result == 1) { //相册
-                  // if (UniversalPlatform.isAndroid) {
-                  //   PermissionStatus photosStatus = await Permission.storage.status;
-                  //   print("photosStatus === photosStatus");
-                  //   print(photosStatus);
-                  //   if (photosStatus.isGranted) {
-                  //     _selectInAlbum();
-                  //   }
-                  //   else {
-                  //     TipsDialog.showDialog(
-                  //         title: "温馨提示",
-                  //         content: "心境奇旅将使用您的相册权限以选择照片上传头像",
-                  //         cancelText: "取消",
-                  //         sureText: "确定",
-                  //         sureHandle: (){
-                  //           _selectInAlbum();
-                  //         }
-                  //     );
-                  //   }
-                  // }
-                  // else {
-                  //   _selectInAlbum();
-                  // }
-                  _selectInAlbum();
                 }
-                // _.submitHeaderPic();
-              }
+              );
+
             },
           )
         ],

+ 1 - 1
lib/pages/my/main/page/mine_page.dart

@@ -1,5 +1,5 @@
 
-import 'package:adaptive_dialog/adaptive_dialog.dart';
+// import 'package:adaptive_dialog/adaptive_dialog.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/services.dart';
 import 'package:flutter_screenutil/flutter_screenutil.dart';

+ 24 - 13
lib/pages/my/setting/page/setting_page.dart

@@ -1,5 +1,5 @@
 
-import 'package:adaptive_dialog/adaptive_dialog.dart';
+// import 'package:adaptive_dialog/adaptive_dialog.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter_easyloading/flutter_easyloading.dart';
@@ -356,19 +356,30 @@ class _SettingState extends State<SettingPage>
                     ),
                   ),
                   onTap: () async{ //退出登录
-                    final result = await showOkCancelAlertDialog(
-                      context: context,
-                      title: "是否退出登录?".tr,
-                      message: "",
-                      okLabel: "确定".tr,
-                      cancelLabel: "取消".tr,
-                      isDestructiveAction: true,
-                      style: AdaptiveStyle.iOS,
+                    // final result = await showOkCancelAlertDialog(
+                    //   context: context,
+                    //   title: "是否退出登录?".tr,
+                    //   message: "",
+                    //   okLabel: "确定".tr,
+                    //   cancelLabel: "取消".tr,
+                    //   isDestructiveAction: true,
+                    //   style: AdaptiveStyle.iOS,
+                    // );
+                    // if (result == OkCancelResult.ok) {
+                    //   UserService().logout();
+                    //   Get.back();
+                    // }
+
+                    TipsDialog.showDialog(
+                        title: "是否退出登录?".tr,
+                        content: "",
+                        cancelText: "取消".tr,
+                        sureText: "确定".tr,
+                        sureHandle: (){
+                          UserService().logout();
+                          Get.back();
+                        }
                     );
-                    if (result == OkCancelResult.ok) {
-                      UserService().logout();
-                      Get.back();
-                    }
                   },
                 ),
               if (ScreenUtil().bottomBarHeight == 0)

+ 1 - 1
lib/pages/today/continue_practice/page/continue_practice_page.dart

@@ -2,7 +2,7 @@
 
 import 'dart:async';
 
-import 'package:adaptive_dialog/adaptive_dialog.dart';
+// import 'package:adaptive_dialog/adaptive_dialog.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter_easyloading/flutter_easyloading.dart';
 import 'package:flutter_screenutil/flutter_screenutil.dart';

+ 1 - 1
lib/pages/today/main/controller/home_ctrl.dart

@@ -3,7 +3,7 @@ import 'dart:async';
 import 'dart:io';
 import 'dart:math';
 
-import 'package:adaptive_dialog/adaptive_dialog.dart';
+// import 'package:adaptive_dialog/adaptive_dialog.dart';
 import 'package:carousel_slider/carousel_controller.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter_easyloading/flutter_easyloading.dart';

+ 186 - 90
lib/pages/today/mood_record/page/mood_text_page.dart

@@ -1,7 +1,7 @@
 
 import 'dart:io';
 
-import 'package:adaptive_dialog/adaptive_dialog.dart';
+// import 'package:adaptive_dialog/adaptive_dialog.dart';
 import 'package:device_info_plus/device_info_plus.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/services.dart';
@@ -21,7 +21,9 @@ import 'package:wechat_assets_picker/wechat_assets_picker.dart';
 
 import '../../../../common/AC.dart';
 import '../../../../gen_a/A.dart';
+import '../../../../utils/bottom_sheet_dialog.dart';
 import '../../../../utils/hex_color.dart';
+import '../../../../utils/modal_action_sheet_dialog.dart';
 import '../../../../utils/picker_img_utils.dart';
 import '../../../../utils/tips_dialog.dart';
 import '../../../my/vip/page/vip_buy_page.dart';
@@ -183,19 +185,29 @@ class MoodTextPage extends GetView<MoodTextCtrl> {
                                                         ),
                                                         onTap: () async{
                                                           controller.focusNode.unfocus();
-                                                          final result = await showOkCancelAlertDialog(
-                                                            context: context,
-                                                            okLabel: "删除照片".tr,
-                                                            cancelLabel: "取消".tr,
-                                                            isDestructiveAction: true,
-                                                            style: AdaptiveStyle.iOS,
-                                                            useActionSheetForIOS: true,
+                                                          // final result = await showOkCancelAlertDialog(
+                                                          //   context: context,
+                                                          //   okLabel: "删除照片".tr,
+                                                          //   cancelLabel: "取消".tr,
+                                                          //   isDestructiveAction: true,
+                                                          //   style: AdaptiveStyle.iOS,
+                                                          //   useActionSheetForIOS: true,
+                                                          // );
+                                                          // if (result == OkCancelResult.ok) {
+                                                          //   _.imageList.removeAt(index);
+                                                          //   _.update(["text", "photoButton"]);
+                                                          //   controller.saveImageToDraft();
+                                                          // }
+
+                                                          BottomSheetDialog.showSheet(
+                                                              sureText: "删除照片".tr,
+                                                              cancelText: "取消".tr,
+                                                              sureHandle: (){
+                                                                _.imageList.removeAt(index);
+                                                                _.update(["text", "photoButton"]);
+                                                                controller.saveImageToDraft();
+                                                              }
                                                           );
-                                                          if (result == OkCancelResult.ok) {
-                                                            _.imageList.removeAt(index);
-                                                            _.update(["text", "photoButton"]);
-                                                            controller.saveImageToDraft();
-                                                          }
                                                         },
                                                       ),
                                                     )
@@ -391,29 +403,49 @@ class MoodTextPage extends GetView<MoodTextCtrl> {
                       ),
                     ),
                     onTap: () async{
-                      final result = await showOkCancelAlertDialog(
-                        context: Get.context!,
-                        okLabel: "删除照片".tr,
-                        cancelLabel: "取消".tr,
-                        isDestructiveAction: true,
-                        style: AdaptiveStyle.iOS,
-                        useActionSheetForIOS: true,
-                      );
-                      if (result == OkCancelResult.ok) {
-                        controller.imageList.removeAt(flagIndex);
-                        if (controller.imageList.isNotEmpty) {
-                          if (flagIndex >= controller.imageList.length) {
-                            flagIndex -= 1;
-                            pageController = PageController(initialPage: flagIndex);
+                      // final result = await showOkCancelAlertDialog(
+                      //   context: Get.context!,
+                      //   okLabel: "删除照片".tr,
+                      //   cancelLabel: "取消".tr,
+                      //   isDestructiveAction: true,
+                      //   style: AdaptiveStyle.iOS,
+                      //   useActionSheetForIOS: true,
+                      // );
+                      // if (result == OkCancelResult.ok) {
+                      //   controller.imageList.removeAt(flagIndex);
+                      //   if (controller.imageList.isNotEmpty) {
+                      //     if (flagIndex >= controller.imageList.length) {
+                      //       flagIndex -= 1;
+                      //       pageController = PageController(initialPage: flagIndex);
+                      //     }
+                      //     controller.update(["text", "photoButton", "big_photo"]);
+                      //   }
+                      //   else {
+                      //     Get.back();
+                      //     controller.update(["text", "photoButton"]);
+                      //   }
+                      //   controller.saveImageToDraft();
+                      // }
+
+                      BottomSheetDialog.showSheet(
+                          sureText: "删除照片".tr,
+                          cancelText: "取消".tr,
+                          sureHandle: (){
+                            controller.imageList.removeAt(flagIndex);
+                            if (controller.imageList.isNotEmpty) {
+                              if (flagIndex >= controller.imageList.length) {
+                                flagIndex -= 1;
+                                pageController = PageController(initialPage: flagIndex);
+                              }
+                              controller.update(["text", "photoButton", "big_photo"]);
+                            }
+                            else {
+                              Get.back();
+                              controller.update(["text", "photoButton"]);
+                            }
+                            controller.saveImageToDraft();
                           }
-                          controller.update(["text", "photoButton", "big_photo"]);
-                        }
-                        else {
-                          Get.back();
-                          controller.update(["text", "photoButton"]);
-                        }
-                        controller.saveImageToDraft();
-                      }
+                      );
                     },
                   ),
                 ],
@@ -438,68 +470,132 @@ class MoodTextPage extends GetView<MoodTextCtrl> {
       return;
     }
 
-    final result = await showModalActionSheet<int>(
-        context: Get.context!,
-        cancelLabel: "取消".tr,
-        style: AdaptiveStyle.iOS,
-        actions: [
-          SheetAction(key: 0, label: "拍照".tr),
-          SheetAction(key: 1, label: "从相册中选取".tr),
-        ]
-    );
-    if (result == 0){ //拍照
-      if (UniversalPlatform.isAndroid) {
-        PermissionStatus camerasStatus = await Permission.camera.status;
-        if (camerasStatus.isGranted) {
-          _takePhone();
+    // final result = await showModalActionSheet<int>(
+    //     context: Get.context!,
+    //     cancelLabel: "取消".tr,
+    //     style: AdaptiveStyle.iOS,
+    //     actions: [
+    //       SheetAction(key: 0, label: "拍照".tr),
+    //       SheetAction(key: 1, label: "从相册中选取".tr),
+    //     ]
+    // );
+    // if (result == 0){ //拍照
+    //   if (UniversalPlatform.isAndroid) {
+    //     PermissionStatus camerasStatus = await Permission.camera.status;
+    //     if (camerasStatus.isGranted) {
+    //       _takePhone();
+    //     }
+    //     else {
+    //       TipsDialog.showDialog(
+    //           title: "温馨提示".tr,
+    //           content: "心境奇旅将使用您的相机权限拍照上传心情记录图片".tr,
+    //           cancelText: "取消".tr,
+    //           sureText: "确定".tr,
+    //           sureHandle: (){
+    //             _takePhone();
+    //           }
+    //       );
+    //     }
+    //   }
+    //   else {
+    //     _takePhone();
+    //   }
+    // }
+    // else if (result == 1) { //从相册中选取
+    //   if (UniversalPlatform.isAndroid) {
+    //     AndroidDeviceInfo androidInfo = await DeviceInfoPlugin().androidInfo;
+    //     String androidBrand = androidInfo.brand.toLowerCase();
+    //     if (androidBrand == "huawei" || androidBrand == "honor") {
+    //       if (await Permission.storage.status.isGranted) {
+    //         _selectPhotosInPhotoAlbum();
+    //       }
+    //       else {
+    //         TipsDialog.showDialog(
+    //             title: "温馨提示".tr,
+    //             content: "心境奇旅将使用您的相册存储权限以选取相册中的图片".tr,
+    //             cancelText: "取消".tr,
+    //             sureText: "确定".tr,
+    //             cancelHandle: (){
+    //               return false;
+    //             },
+    //             sureHandle: () async {
+    //               _selectPhotosInPhotoAlbum();
+    //             }
+    //         );
+    //       }
+    //     }
+    //     else {
+    //       _selectPhotosInPhotoAlbum();
+    //     }
+    //   }
+    //   else {
+    //     _selectPhotosInPhotoAlbum();
+    //   }
+    // }
+
+    ModalActionSheetDialog.showSheet(
+      cancelText: "取消".tr,
+      actions: [
+        ActionSheetModel(id: 0, name: "拍照".tr),
+        ActionSheetModel(id: 1, name: "从相册中选取".tr)
+      ],
+      actionHandle: (result) async {
+        if (result == 0){ //拍照
+          if (UniversalPlatform.isAndroid) {
+            PermissionStatus camerasStatus = await Permission.camera.status;
+            if (camerasStatus.isGranted) {
+              _takePhone();
+            }
+            else {
+              TipsDialog.showDialog(
+                  title: "温馨提示".tr,
+                  content: "心境奇旅将使用您的相机权限拍照上传心情记录图片".tr,
+                  cancelText: "取消".tr,
+                  sureText: "确定".tr,
+                  sureHandle: (){
+                    _takePhone();
+                  }
+              );
+            }
+          }
+          else {
+            _takePhone();
+          }
         }
-        else {
-          TipsDialog.showDialog(
-              title: "温馨提示".tr,
-              content: "心境奇旅将使用您的相机权限拍照上传心情记录图片".tr,
-              cancelText: "取消".tr,
-              sureText: "确定".tr,
-              sureHandle: (){
-                _takePhone();
+        else if (result == 1) { //从相册中选取
+          if (UniversalPlatform.isAndroid) {
+            AndroidDeviceInfo androidInfo = await DeviceInfoPlugin().androidInfo;
+            String androidBrand = androidInfo.brand.toLowerCase();
+            if (androidBrand == "huawei" || androidBrand == "honor") {
+              if (await Permission.storage.status.isGranted) {
+                _selectPhotosInPhotoAlbum();
               }
-          );
-        }
-      }
-      else {
-        _takePhone();
-      }
-    }
-    else if (result == 1) { //从相册中选取
-      if (UniversalPlatform.isAndroid) {
-        AndroidDeviceInfo androidInfo = await DeviceInfoPlugin().androidInfo;
-        String androidBrand = androidInfo.brand.toLowerCase();
-        if (androidBrand == "huawei" || androidBrand == "honor") {
-          if (await Permission.storage.status.isGranted) {
-            _selectPhotosInPhotoAlbum();
+              else {
+                TipsDialog.showDialog(
+                    title: "温馨提示".tr,
+                    content: "心境奇旅将使用您的相册存储权限以选取相册中的图片".tr,
+                    cancelText: "取消".tr,
+                    sureText: "确定".tr,
+                    cancelHandle: (){
+                      return false;
+                    },
+                    sureHandle: () async {
+                      _selectPhotosInPhotoAlbum();
+                    }
+                );
+              }
+            }
+            else {
+              _selectPhotosInPhotoAlbum();
+            }
           }
           else {
-            TipsDialog.showDialog(
-                title: "温馨提示".tr,
-                content: "心境奇旅将使用您的相册存储权限以选取相册中的图片".tr,
-                cancelText: "取消".tr,
-                sureText: "确定".tr,
-                cancelHandle: (){
-                  return false;
-                },
-                sureHandle: () async {
-                  _selectPhotosInPhotoAlbum();
-                }
-            );
+            _selectPhotosInPhotoAlbum();
           }
         }
-        else {
-          _selectPhotosInPhotoAlbum();
-        }
-      }
-      else {
-        _selectPhotosInPhotoAlbum();
       }
-    }
+    );
+
   }
 
   // 拍照

+ 140 - 66
lib/pages/today/practice_assess/controller/exam_ctrl.dart

@@ -3,7 +3,7 @@ import 'dart:async';
 import 'dart:convert';
 import 'dart:io';
 
-import 'package:adaptive_dialog/adaptive_dialog.dart';
+// import 'package:adaptive_dialog/adaptive_dialog.dart';
 import 'package:device_info_plus/device_info_plus.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/services.dart';
@@ -16,6 +16,7 @@ import 'package:iquokka/module/user_service.dart';
 import 'package:iquokka/pages/my/main/model/user_model.dart';
 import 'package:iquokka/pages/today/practice/page/assess_report_page.dart';
 import 'package:iquokka/pages/today/practice_assess/model/segment_image_model.dart';
+import 'package:iquokka/utils/modal_action_sheet_dialog.dart';
 import 'package:iquokka/utils/tips_dialog.dart';
 import 'package:logger/logger.dart';
 import 'package:permission_handler/permission_handler.dart';
@@ -245,16 +246,26 @@ class ExamCtrl extends GetxController {
       if (ret.isSuccess() && ret.data != null) {
         segmentList = ret.data!;
         if (segmentList.isEmpty) {
-          final result = await showOkAlertDialog(
-            context: Get.context!,
-            title: "没有试题题目".tr,
-            message: "",
-            okLabel: "退出".tr,
-            style: AdaptiveStyle.iOS,
+          // final result = await showOkAlertDialog(
+          //   context: Get.context!,
+          //   title: "没有试题题目".tr,
+          //   message: "",
+          //   okLabel: "退出".tr,
+          //   style: AdaptiveStyle.iOS,
+          // );
+          // if (result == OkCancelResult.ok) {
+          //   Get.back();
+          // }
+
+          TipsDialog.showDialog(
+              title: "没有试题题目".tr,
+              content: "",
+              sureText: "确定".tr,
+              actions: 1,
+              sureHandle: (){
+                Get.back();
+              }
           );
-          if (result == OkCancelResult.ok) {
-            Get.back();
-          }
         }
         else {
           update(["appBar", "degreeBar", "exam", "bottom"]);
@@ -969,69 +980,132 @@ class ExamCtrl extends GetxController {
       return;
     }
 
-    final result = await showModalActionSheet<int>(
-        context: Get.context!,
-        cancelLabel: "取消".tr,
-        style: AdaptiveStyle.iOS,
-        useRootNavigator: false,
-        actions: [
-          SheetAction(key: 0, label: "拍照".tr),
-          SheetAction(key: 1, label: "从相册中选取".tr),
-        ]
-    );
-    if (result == 0){ //拍照
-      if (UniversalPlatform.isAndroid) {
-        PermissionStatus camerasStatus = await Permission.camera.status;
-        if (camerasStatus.isGranted) {
-          _takePhone();
+    // final result = await showModalActionSheet<int>(
+    //     context: Get.context!,
+    //     cancelLabel: "取消".tr,
+    //     style: AdaptiveStyle.iOS,
+    //     useRootNavigator: false,
+    //     actions: [
+    //       SheetAction(key: 0, label: "拍照".tr),
+    //       SheetAction(key: 1, label: "从相册中选取".tr),
+    //     ]
+    // );
+    // if (result == 0){ //拍照
+    //   if (UniversalPlatform.isAndroid) {
+    //     PermissionStatus camerasStatus = await Permission.camera.status;
+    //     if (camerasStatus.isGranted) {
+    //       _takePhone();
+    //     }
+    //     else {
+    //       TipsDialog.showDialog(
+    //           title: "温馨提示".tr,
+    //           content: "心境奇旅将使用您的相机权限拍照上传心情记录图片".tr,
+    //           cancelText: "取消".tr,
+    //           sureText: "确定".tr,
+    //           sureHandle: (){
+    //             _takePhone();
+    //           }
+    //       );
+    //     }
+    //   }
+    //   else {
+    //     _takePhone();
+    //   }
+    // }
+    // else if (result == 1) { //从相册中选取
+    //   if (UniversalPlatform.isAndroid) {
+    //     AndroidDeviceInfo androidInfo = await DeviceInfoPlugin().androidInfo;
+    //     String androidBrand = androidInfo.brand.toLowerCase();
+    //     if (androidBrand == "huawei" || androidBrand == "honor") {
+    //       if (await Permission.storage.status.isGranted) {
+    //         _selectPhotosInPhotoAlbum();
+    //       }
+    //       else {
+    //         TipsDialog.showDialog(
+    //             title: "温馨提示".tr,
+    //             content: "心境奇旅将使用您的相册存储权限以选取相册中的图片".tr,
+    //             cancelText: "取消".tr,
+    //             sureText: "确定".tr,
+    //             cancelHandle: (){
+    //               return false;
+    //             },
+    //             sureHandle: () async {
+    //               _selectPhotosInPhotoAlbum();
+    //             }
+    //         );
+    //       }
+    //     }
+    //     else {
+    //       _selectPhotosInPhotoAlbum();
+    //     }
+    //   }
+    //   else {
+    //     _selectPhotosInPhotoAlbum();
+    //   }
+    // }
+
+    ModalActionSheetDialog.showSheet(
+      cancelText: "取消".tr,
+      actions: [
+        ActionSheetModel(id: 0, name: "拍照".tr),
+        ActionSheetModel(id: 1, name: "从相册中选取".tr)
+      ],
+      actionHandle: (result) async {
+        if (result == 0){ //拍照
+          if (UniversalPlatform.isAndroid) {
+            PermissionStatus camerasStatus = await Permission.camera.status;
+            if (camerasStatus.isGranted) {
+              _takePhone();
+            }
+            else {
+              TipsDialog.showDialog(
+                  title: "温馨提示".tr,
+                  content: "心境奇旅将使用您的相机权限拍照上传心情记录图片".tr,
+                  cancelText: "取消".tr,
+                  sureText: "确定".tr,
+                  sureHandle: (){
+                    _takePhone();
+                  }
+              );
+            }
+          }
+          else {
+            _takePhone();
+          }
         }
-        else {
-          TipsDialog.showDialog(
-              title: "温馨提示".tr,
-              content: "心境奇旅将使用您的相机权限拍照上传心情记录图片".tr,
-              cancelText: "取消".tr,
-              sureText: "确定".tr,
-              sureHandle: (){
-                _takePhone();
+        else if (result == 1) { //从相册中选取
+          if (UniversalPlatform.isAndroid) {
+            AndroidDeviceInfo androidInfo = await DeviceInfoPlugin().androidInfo;
+            String androidBrand = androidInfo.brand.toLowerCase();
+            if (androidBrand == "huawei" || androidBrand == "honor") {
+              if (await Permission.storage.status.isGranted) {
+                _selectPhotosInPhotoAlbum();
               }
-          );
-        }
-      }
-      else {
-        _takePhone();
-      }
-    }
-    else if (result == 1) { //从相册中选取
-      if (UniversalPlatform.isAndroid) {
-        AndroidDeviceInfo androidInfo = await DeviceInfoPlugin().androidInfo;
-        String androidBrand = androidInfo.brand.toLowerCase();
-        if (androidBrand == "huawei" || androidBrand == "honor") {
-          if (await Permission.storage.status.isGranted) {
-            _selectPhotosInPhotoAlbum();
+              else {
+                TipsDialog.showDialog(
+                    title: "温馨提示".tr,
+                    content: "心境奇旅将使用您的相册存储权限以选取相册中的图片".tr,
+                    cancelText: "取消".tr,
+                    sureText: "确定".tr,
+                    cancelHandle: (){
+                      return false;
+                    },
+                    sureHandle: () async {
+                      _selectPhotosInPhotoAlbum();
+                    }
+                );
+              }
+            }
+            else {
+              _selectPhotosInPhotoAlbum();
+            }
           }
           else {
-            TipsDialog.showDialog(
-                title: "温馨提示".tr,
-                content: "心境奇旅将使用您的相册存储权限以选取相册中的图片".tr,
-                cancelText: "取消".tr,
-                sureText: "确定".tr,
-                cancelHandle: (){
-                  return false;
-                },
-                sureHandle: () async {
-                  _selectPhotosInPhotoAlbum();
-                }
-            );
+            _selectPhotosInPhotoAlbum();
           }
         }
-        else {
-          _selectPhotosInPhotoAlbum();
-        }
-      }
-      else {
-        _selectPhotosInPhotoAlbum();
       }
-    }
+    );
   }
 
   // 拍照

+ 1 - 1
lib/pages/today/practice_assess/page/exam_page.dart

@@ -1,5 +1,5 @@
 
-import 'package:adaptive_dialog/adaptive_dialog.dart';
+// import 'package:adaptive_dialog/adaptive_dialog.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter_screenutil/flutter_screenutil.dart';
 import 'package:get/get.dart';

+ 64 - 35
lib/pages/today/practice_assess/view/essay_view.dart

@@ -1,6 +1,6 @@
 import 'dart:io';
 
-import 'package:adaptive_dialog/adaptive_dialog.dart';
+// import 'package:adaptive_dialog/adaptive_dialog.dart';
 import 'package:cached_network_image/cached_network_image.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/services.dart';
@@ -13,6 +13,7 @@ import 'package:photo_view/photo_view_gallery.dart';
 
 import '../../../../common/AC.dart';
 import '../../../../gen_a/A.dart';
+import '../../../../utils/bottom_sheet_dialog.dart';
 import '../../../../utils/hex_color.dart';
 import '../../../../utils/oss_utils.dart';
 import '../../mood_record/model/mood_record_image_model.dart';
@@ -139,19 +140,28 @@ class EssayView extends GetView<ExamCtrl> {
                                             ),
                                             onTap: () async{
                                               controller.focusNode.unfocus();
-                                              final result = await showOkCancelAlertDialog(
-                                                context: context,
-                                                okLabel: "删除照片".tr,
-                                                cancelLabel: "取消".tr,
-                                                isDestructiveAction: true,
-                                                style: AdaptiveStyle.iOS,
-                                                useActionSheetForIOS: true,
+                                              // final result = await showOkCancelAlertDialog(
+                                              //   context: context,
+                                              //   okLabel: "删除照片".tr,
+                                              //   cancelLabel: "取消".tr,
+                                              //   isDestructiveAction: true,
+                                              //   style: AdaptiveStyle.iOS,
+                                              //   useActionSheetForIOS: true,
+                                              // );
+                                              // if (result == OkCancelResult.ok) {
+                                              //   controller.segmentList[controller.index].imageList.removeAt(index);
+                                              //   controller.update(["exam", "bottom"]);
+                                              //   //controller.saveImageToDraft();
+                                              // }
+
+                                              BottomSheetDialog.showSheet(
+                                                  sureText: "删除照片".tr,
+                                                  cancelText: "取消".tr,
+                                                  sureHandle: (){
+                                                    controller.segmentList[controller.index].imageList.removeAt(index);
+                                                    controller.update(["exam", "bottom"]);
+                                                  }
                                               );
-                                              if (result == OkCancelResult.ok) {
-                                                controller.segmentList[controller.index].imageList.removeAt(index);
-                                                controller.update(["exam", "bottom"]);
-                                                //controller.saveImageToDraft();
-                                              }
                                             },
                                           ),
                                         )
@@ -277,29 +287,48 @@ class EssayView extends GetView<ExamCtrl> {
                       ),
                     ),
                     onTap: () async{
-                      final result = await showOkCancelAlertDialog(
-                        context: Get.context!,
-                        okLabel: "删除照片".tr,
-                        cancelLabel: "取消".tr,
-                        isDestructiveAction: true,
-                        style: AdaptiveStyle.iOS,
-                        useActionSheetForIOS: true,
-                      );
-                      if (result == OkCancelResult.ok) {
-                        controller.segmentList[controller.index].imageList.removeAt(flagIndex);
-                        if (controller.segmentList[controller.index].imageList.isNotEmpty) {
-                          if (flagIndex >= controller.segmentList[controller.index].imageList.length) {
-                            flagIndex -= 1;
-                            pageController = PageController(initialPage: flagIndex);
+                      // final result = await showOkCancelAlertDialog(
+                      //   context: Get.context!,
+                      //   okLabel: "删除照片".tr,
+                      //   cancelLabel: "取消".tr,
+                      //   isDestructiveAction: true,
+                      //   style: AdaptiveStyle.iOS,
+                      //   useActionSheetForIOS: true,
+                      // );
+                      // if (result == OkCancelResult.ok) {
+                      //   controller.segmentList[controller.index].imageList.removeAt(flagIndex);
+                      //   if (controller.segmentList[controller.index].imageList.isNotEmpty) {
+                      //     if (flagIndex >= controller.segmentList[controller.index].imageList.length) {
+                      //       flagIndex -= 1;
+                      //       pageController = PageController(initialPage: flagIndex);
+                      //     }
+                      //     controller.update(["text", "photoButton", "big_photo"]);
+                      //   }
+                      //   else {
+                      //     Get.back();
+                      //     controller.update(["text", "photoButton"]);
+                      //   }
+                      //   //controller.saveImageToDraft();
+                      // }
+
+                      BottomSheetDialog.showSheet(
+                          sureText: "删除照片".tr,
+                          cancelText: "取消".tr,
+                          sureHandle: (){
+                            controller.segmentList[controller.index].imageList.removeAt(flagIndex);
+                            if (controller.segmentList[controller.index].imageList.isNotEmpty) {
+                              if (flagIndex >= controller.segmentList[controller.index].imageList.length) {
+                                flagIndex -= 1;
+                                pageController = PageController(initialPage: flagIndex);
+                              }
+                              controller.update(["text", "photoButton", "big_photo"]);
+                            }
+                            else {
+                              Get.back();
+                              controller.update(["text", "photoButton"]);
+                            }
                           }
-                          controller.update(["text", "photoButton", "big_photo"]);
-                        }
-                        else {
-                          Get.back();
-                          controller.update(["text", "photoButton"]);
-                        }
-                        //controller.saveImageToDraft();
-                      }
+                      );
                     },
                   ),
                 ],

+ 117 - 0
lib/utils/modal_action_sheet_dialog.dart

@@ -0,0 +1,117 @@
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+
+import 'hex_color.dart';
+
+class ModalActionSheetDialog {
+
+  static void showSheet({
+    String? cancelText,
+    List<ActionSheetModel>? actions,
+    final actionHandle
+  }) {
+    Get.bottomSheet(
+      Container(
+        //height: 230,
+        child: Column(
+          mainAxisSize: MainAxisSize.min,
+          children: [
+            Spacer(),
+            Container(
+              width: 377.w,
+              height: 56.0*(actions??[]).length,
+              decoration: BoxDecoration(
+                  color: HexColor.isDarkMode?HexColor("#1C1C1E"):HexColor("#FFFFFF"),
+                  borderRadius: BorderRadius.circular(14)
+              ),
+              child: Column(
+                children: List.generate((actions??[]).length, (index){
+                  ActionSheetModel model = actions![index];
+                  return InkWell(
+                    child: Container(
+                      height: 56,
+                      alignment: Alignment.center,
+                      child: index==0?Text(
+                        model.name,
+                        style: TextStyle(
+                            color: HexColor("#0A84FF"),
+                            fontWeight: FontWeight.w400,
+                            fontSize: 17
+                        ),
+                      ):Column(
+                        children: [
+                          Container(
+                            margin: EdgeInsets.only(left: 15, right: 15),
+                            height: 1,
+                            color: HexColor.QUOKKA_L1,
+                          ),
+                          Expanded(
+                            child: Container(
+                              alignment: Alignment.center,
+                              child: Text(
+                                model.name,
+                                style: TextStyle(
+                                    color: HexColor("#0A84FF"),
+                                    fontWeight: FontWeight.w400,
+                                    fontSize: 17
+                                ),
+                              ),
+                            )
+                          )
+                        ],
+                      ),
+                    ),
+                    onTap: () {
+                      Get.back();
+                      actionHandle(model.id);
+                    },
+                  );
+                }),
+              ),
+            ),
+            SizedBox(
+              height: 10,
+            ),
+            InkWell(
+              child: Container(
+                width: 377.w,
+                height: 56,
+                alignment: Alignment.center,
+                decoration: BoxDecoration(
+                    color: HexColor.isDarkMode?HexColor("#1C1C1E"):HexColor("#FFFFFF"),
+                    borderRadius: BorderRadius.circular(14)
+                ),
+                child: Text(
+                  cancelText??"取消",
+                  style: TextStyle(
+                      color: HexColor("#0A84FF"),
+                      fontWeight: FontWeight.w500,
+                      fontSize: 20
+                  ),
+                ),
+              ),
+              onTap: (){
+                Get.back();
+              },
+            ),
+            SizedBox(
+              height: ScreenUtil().bottomBarHeight+10,
+            )
+          ],
+        ),
+      ),
+      enableDrag: false,
+      isDismissible: true,
+    );
+  }
+}
+
+class ActionSheetModel {
+
+  int id;
+  String name;
+
+  ActionSheetModel({required this.id, required this.name});
+}

+ 0 - 4
linux/flutter/generated_plugin_registrant.cc

@@ -6,15 +6,11 @@
 
 #include "generated_plugin_registrant.h"
 
-#include <dynamic_color/dynamic_color_plugin.h>
 #include <file_selector_linux/file_selector_plugin.h>
 #include <gtk/gtk_plugin.h>
 #include <url_launcher_linux/url_launcher_plugin.h>
 
 void fl_register_plugins(FlPluginRegistry* registry) {
-  g_autoptr(FlPluginRegistrar) dynamic_color_registrar =
-      fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin");
-  dynamic_color_plugin_register_with_registrar(dynamic_color_registrar);
   g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
       fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
   file_selector_plugin_register_with_registrar(file_selector_linux_registrar);

+ 0 - 1
linux/flutter/generated_plugins.cmake

@@ -3,7 +3,6 @@
 #
 
 list(APPEND FLUTTER_PLUGIN_LIST
-  dynamic_color
   file_selector_linux
   gtk
   url_launcher_linux

+ 0 - 2
macos/Flutter/GeneratedPluginRegistrant.swift

@@ -10,7 +10,6 @@ import appkit_ui_element_colors
 import audio_session
 import connectivity_plus_macos
 import device_info_plus
-import dynamic_color
 import file_selector_macos
 import flutter_image_compress_macos
 import flutter_timezone
@@ -36,7 +35,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
   AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin"))
   ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
   DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
-  DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin"))
   FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
   FlutterImageCompressMacosPlugin.register(with: registry.registrar(forPlugin: "FlutterImageCompressMacosPlugin"))
   FlutterTimezonePlugin.register(with: registry.registrar(forPlugin: "FlutterTimezonePlugin"))

+ 0 - 32
pubspec.lock

@@ -1,22 +1,6 @@
 # Generated by pub
 # See https://dart.dev/tools/pub/glossary#lockfile
 packages:
-  adaptive_dialog:
-    dependency: "direct main"
-    description:
-      name: adaptive_dialog
-      sha256: "910debe8766eff4b378ed5164bb470debb87c53a3bdf6adee03c79f64fbf7348"
-      url: "https://pub.dev"
-    source: hosted
-    version: "1.10.1"
-  animations:
-    dependency: transitive
-    description:
-      name: animations
-      sha256: d3d6dcfb218225bbe68e87ccf6378bbb2e32a94900722c5f81611dad089911cb
-      url: "https://pub.dev"
-    source: hosted
-    version: "2.0.11"
   app_links:
     dependency: "direct main"
     description:
@@ -321,14 +305,6 @@ packages:
       url: "https://pub.dev"
     source: hosted
     version: "2.3.9"
-  dynamic_color:
-    dependency: transitive
-    description:
-      name: dynamic_color
-      sha256: "43a5a6679649a7731ab860334a5812f2067c2d9ce6452cf069c5e0c25336c17c"
-      url: "https://pub.dev"
-    source: hosted
-    version: "1.8.1"
   easy_refresh:
     dependency: "direct main"
     description:
@@ -957,14 +933,6 @@ packages:
       url: "https://pub.dev"
     source: hosted
     version: "2.0.5"
-  intersperse:
-    dependency: transitive
-    description:
-      name: intersperse
-      sha256: "2f8a905c96f6cbba978644a3d5b31b8d86ddc44917662df7d27a61f3df66a576"
-      url: "https://pub.dev"
-    source: hosted
-    version: "2.0.0"
   intl:
     dependency: transitive
     description:

+ 2 - 2
pubspec.yaml

@@ -98,8 +98,8 @@ dependencies:
   #数据存储
   shared_preferences: ^2.0.18
 
-  #弹窗
-  adaptive_dialog: ^1.8.2
+  #弹窗,鸿蒙不支持
+#  adaptive_dialog: ^1.8.2
 
   #下拉刷新,上拉加载更多
   pull_to_refresh: ^2.0.0

+ 0 - 3
windows/flutter/generated_plugin_registrant.cc

@@ -8,7 +8,6 @@
 
 #include <app_links/app_links_plugin_c_api.h>
 #include <connectivity_plus_windows/connectivity_plus_windows_plugin.h>
-#include <dynamic_color/dynamic_color_plugin_c_api.h>
 #include <file_selector_windows/file_selector_windows.h>
 #include <permission_handler_windows/permission_handler_windows_plugin.h>
 #include <share_plus/share_plus_windows_plugin_c_api.h>
@@ -19,8 +18,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
       registry->GetRegistrarForPlugin("AppLinksPluginCApi"));
   ConnectivityPlusWindowsPluginRegisterWithRegistrar(
       registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
-  DynamicColorPluginCApiRegisterWithRegistrar(
-      registry->GetRegistrarForPlugin("DynamicColorPluginCApi"));
   FileSelectorWindowsRegisterWithRegistrar(
       registry->GetRegistrarForPlugin("FileSelectorWindows"));
   PermissionHandlerWindowsPluginRegisterWithRegistrar(

+ 0 - 1
windows/flutter/generated_plugins.cmake

@@ -5,7 +5,6 @@
 list(APPEND FLUTTER_PLUGIN_LIST
   app_links
   connectivity_plus_windows
-  dynamic_color
   file_selector_windows
   permission_handler_windows
   share_plus