Sfoglia il codice sorgente

功能模块的调试

liukai 3 settimane fa
parent
commit
3c95db157c

+ 1 - 1
app/android/app/src/main/AndroidManifest.xml

@@ -12,7 +12,7 @@
     <uses-permission android:name="android.permission.RECORD_AUDIO" />
     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
     <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
-<!--    <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />-->
+    <uses-permission android:name="android.permission.CALL_PHONE" />
 
     <!-- Provide required visibility configuration for API level 30 and above -->
     <queries>

+ 2 - 2
packages/cpt_main/lib/modules/feedback/page/feedback_page.dart

@@ -1,5 +1,3 @@
-import 'package:cpt_main/modules/home/page/home_page.dart';
-import 'package:cpt_main/modules/main/page/main_page.dart';
 import 'package:cs_resources/generated/assets.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
@@ -18,6 +16,8 @@ class FeedbackPage extends StatelessWidget {
 
   @override
   Widget build(BuildContext context) {
+    Log.d("FeedbackPage - build 了");
+
     return Scaffold(
       appBar: MyAppBar.appBar(context, "自定义Appbar",backgroundColor: context.theme.primaryColorDark),
       body: Center(

+ 120 - 17
packages/cpt_main/lib/modules/visitor/page/visitor_page.dart

@@ -1,13 +1,27 @@
 import 'package:cpt_main/modules/visitor/vm/visitor_view_model.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:cs_resources/theme/theme_notifier.dart';
+import 'package:flutter/cupertino.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:plugin_basic/basic_export.dart';
 import 'package:plugin_basic/provider/user_config/user_config_service.dart';
+import 'package:plugin_platform/engine/cache/local_cache_manager.dart';
+import 'package:plugin_platform/engine/dialog/dialog_engine.dart';
+import 'package:plugin_platform/engine/directory/directory_util.dart';
+import 'package:plugin_platform/engine/image/image_preview.dart';
+import 'package:plugin_platform/engine/media/image_picker_utils.dart';
+import 'package:plugin_platform/engine/notify/notify_engine.dart';
+import 'package:plugin_platform/engine/sp/sp_util.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import 'package:shared/utils/log_utils.dart';
 import 'package:widgets/dialog/app_default_dialog.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_load_image.dart';
+import 'package:widgets/picker/date_picker_util.dart';
+import 'package:widgets/picker/option_pick_util.dart';
+import 'package:plugin_platform/platform_export.dart';
 
 @RoutePage()
 class VisitorPage extends HookConsumerWidget {
@@ -18,6 +32,7 @@ class VisitorPage extends HookConsumerWidget {
     final _userService = UserConfigService.getInstance(ref: ref);
     final _userConfig = UserConfigService.getState(ref: ref);
     final _viewModel = ref.watch(visitorViewModelProvider.notifier);
+    Log.d("VisitorPage - build 了");
 
     return Scaffold(
       appBar: AppBar(title: Text("Visitor")),
@@ -49,11 +64,19 @@ class VisitorPage extends HookConsumerWidget {
                   child: Text('网络请求'),
                 ),
                 ElevatedButton(
-                  onPressed: () {},
+                  onPressed: () {
+                    ToastEngine.show("这是一个吐司气泡");
+                  },
                   child: Text('吐司/气泡'),
                 ),
                 ElevatedButton(
-                  onPressed: () {},
+                  onPressed: () async {
+                    NotifyEngine.showSuccess("操作成功");
+                    await Future.delayed(Duration(seconds: 3));
+                    NotifyEngine.showFailure("操作失败");
+                    await Future.delayed(Duration(seconds: 3));
+                    NotifyEngine.showError("操作错误");
+                  },
                   child: Text('成功/失败通知'),
                 ),
               ],
@@ -62,15 +85,43 @@ class VisitorPage extends HookConsumerWidget {
               mainAxisAlignment: MainAxisAlignment.spaceAround,
               children: [
                 ElevatedButton(
-                  onPressed: () {},
+                  onPressed: () {
+                    DialogEngine.show(
+                        widget: AppDefaultDialog(
+                          //这种布局自己自定义去
+                          title: "提示",
+                          message: "默认的弹窗,自定义的弹窗自己画去",
+                          confirmAction: () {
+                            ToastEngine.show("点击了确定");
+                          },
+                        ));
+                  },
                   child: Text('弹窗'),
                 ),
                 ElevatedButton(
-                  onPressed: () {},
+                  onPressed: () {
+                    DateTime dateTime = DateTime.now();
+                    DatePickerUtil.showCupertinoDatePicker(
+                      mode: CupertinoDatePickerMode.date,
+                      selectedDateTime: dateTime,
+                      onDateTimeChanged: (date) {
+                        dateTime = date;
+                      },
+                      title: "选择日期",
+                    );
+                  },
                   child: Text('时间选择'),
                 ),
                 ElevatedButton(
-                  onPressed: () {},
+                  onPressed: () {
+                    OptionPickerUtil.showCupertinoOptionPicker(
+                      items: ["前天", "昨天", "今天", "明天", "后天"],
+                      initialSelectIndex: 0,
+                      onPickerChanged: (_, index) {
+                        ToastEngine.show("选中的索引为:$index");
+                      },
+                    );
+                  },
                   child: Text('条件选择'),
                 ),
               ],
@@ -79,15 +130,27 @@ class VisitorPage extends HookConsumerWidget {
               mainAxisAlignment: MainAxisAlignment.spaceAround,
               children: [
                 ElevatedButton(
-                  onPressed: () {},
-                  child: Text('相机'),
-                ),
-                ElevatedButton(
-                  onPressed: () {},
-                  child: Text('相册'),
+                  onPressed: () {
+                    ImagePickerUtils().show(context, (filePath) {
+                      ToastEngine.show("图片的路径为:$filePath");
+                    });
+                  },
+                  child: Text('相册/相册'),
                 ),
                 ElevatedButton(
-                  onPressed: () {},
+                  onPressed: () async {
+                    final PermissionStatus permissionStatus = await Permission.phone.request();
+                    if (permissionStatus.isGranted) {
+                      final Uri launchUri = Uri(
+                        scheme: 'tel',
+                        path: "+8618571458165",
+                      );
+                      await launchUrl(launchUri);
+                    } else {
+                      // 权限被拒绝
+                      ToastEngine.show('Phone call permission denied');
+                    }
+                  },
                   child: Text('App动态权限'),
                 ),
               ],
@@ -96,11 +159,43 @@ class VisitorPage extends HookConsumerWidget {
               mainAxisAlignment: MainAxisAlignment.spaceAround,
               children: [
                 ElevatedButton(
-                  onPressed: () {},
-                  child: Text('App的沙盒路径'),
+                  onPressed: () async {
+                    final tempPath = DirectoryUtil.getTempPath();
+                    final docPath = DirectoryUtil.getAppDocPath();
+                    final appSupportPath = DirectoryUtil.getAppSupportPath();
+                    final storagePath = DirectoryUtil.getStoragePath(); //只能拿沙盒路径,外置SD卡是拿不到的
+                    final cacheSize = await DirectoryUtil.getAppCacheSize();
+
+                    Log.d("沙盒路径 - tempPath:$tempPath docPath:$docPath appSupportPath:$appSupportPath storagePath:$storagePath "
+                        "cacheSize:$cacheSize");
+                  },
+                  child: Text('沙盒路径'),
                 ),
                 ElevatedButton(
-                  onPressed: () {},
+                  onPressed: () async {
+                    //Key-Value的重要信息持久化缓存(只存小东西如配置,token)
+                    await SPUtil.putBool("isVip", true);
+                    final isVip = SPUtil.getBool("isVip", defValue: false);
+                    Log.d("存入并取出SP的值 - isVip:$isVip");
+
+                    //沙盒缓存文件缓存(可存入对象,大文本,Json,网络请求数据)
+                    await localCache.put("name", "李四", expiry: const Duration(seconds: 10));
+                    await localCache.put("age", 28, expiry: const Duration(seconds: 10));
+                    await localCache.put("gender", 1);
+                    await localCache.put("skills", ["游泳", "跑步", "编程"]);
+                    await localCache.put("json", {"code": "200", "msg": "Success", "data": 2});
+
+                    String? name = await localCache.get("name");
+                    int? age = await localCache.get("age");
+                    int? gender = await localCache.get("gender");
+                    List<String>? skills = await localCache.get("skills");
+                    Map<String, dynamic>? json = await localCache.get("json");
+                    Log.d("获取缓存name:$name");
+                    Log.d("获取缓存age:$age");
+                    Log.d("获取缓存gender:$gender");
+                    Log.d("获取缓存skills:$skills");
+                    Log.d("获取缓存json:$json");
+                  },
                   child: Text('缓存用法'),
                 ),
                 ElevatedButton(
@@ -116,9 +211,17 @@ class VisitorPage extends HookConsumerWidget {
                   onPressed: () {},
                   child: Text('图片加载'),
                 ),
-                MyLoadImage("https://pic.quanjing.com/cz/8s/QJ8856274343.jpg@%21794ws", width: 80, height: 80),
+                Hero(
+                    tag: '112cc8a34e13',
+                    child: MyLoadImage("https://pic.quanjing.com/cz/8s/QJ8856274343.jpg@%21794ws", width: 80, height: 80),
+                ),
                 ElevatedButton(
-                  onPressed: () {},
+                  onPressed: () {
+                    //单图预览,支持hero
+                    ImagePreviewEngine.singleImagePreview(context, "https://pic.quanjing.com/cz/8s/QJ8856274343.jpg@%21794ws", heroTag: '112cc8a34e13');
+                    //多图预览,支持hero
+                    // ImagePreviewEngine.multipleImagePreview(context, "https://pic.quanjing.com/cz/8s/QJ8856274343.jpg@%21794ws");
+                  },
                   child: Text('图片预览'),
                 ),
               ],

+ 1 - 1
packages/cs_domain/lib/repository/demo_repository.dart

@@ -1,5 +1,5 @@
 import 'package:domain/entity/server_time.dart';
-import 'package:plugin_platform/dio_export.dart';
+import 'package:plugin_platform/platform_export.dart';
 import 'package:plugin_platform/http/dio_engine.dart';
 import 'package:plugin_platform/http/http_result.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';

+ 5 - 0
packages/cs_initializer/lib/app_initializer.dart

@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
 import 'package:flutter/services.dart';
 import 'package:plugin_platform/engine/directory/directory_util.dart';
 import 'package:plugin_platform/engine/sp/sp_util.dart';
+import 'package:plugin_platform/engine/cache/local_cache_manager.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:plugin_basic/provider/app_config/app_config_service.dart';
 
@@ -55,6 +56,8 @@ class AppInitializer {
 
       DirectoryUtil.getInstance(), // SD卡管控
 
+      localCache.init(), //Hive本地缓存初始化
+
       //AppConfig服务
       AppConfigService.getInstance().initAsync(),
     ];
@@ -97,6 +100,8 @@ class AppInitializer {
     setInitDir(initTempDir: true, initAppDocDir: true, initAppSupportDir: true, initStorageDir: false);
     DirectoryUtil.getInstance(); //SD卡管控
 
+    localCache.init(); //Hive本地缓存初始化
+
     //AppConfig服务
     await AppConfigService.getInstance().initAsync();
 

+ 1 - 1
packages/cs_plugin_basic/lib/dio_interceptors/interceptor_status_code_dio.dart

@@ -1,6 +1,6 @@
 
 import 'package:plugin_basic/provider/user_config/user_config_service.dart';
-import 'package:plugin_platform/dio_export.dart';
+import 'package:plugin_platform/platform_export.dart';
 import 'package:plugin_platform/engine/dialog/dialog_engine.dart';
 import 'package:widgets/dialog/app_default_dialog.dart';
 

+ 0 - 1
packages/cs_plugin_platform/lib/dio_export.dart

@@ -1 +0,0 @@
-export 'package:dio/dio.dart';

+ 101 - 102
packages/cs_plugin_platform/lib/engine/media/album_engine.dart

@@ -1,102 +1,101 @@
-// import 'package:flutter/material.dart';
-// import 'package:flutter/services.dart';
-// import 'package:get/get.dart';
-// import 'package:wechat_assets_picker/wechat_assets_picker.dart';
-//
-// /*
-//  * 本地图库的引擎封装,目前用的 wechat_assets_picker 插件
-//  */
-// class AlbumEngine {
-//   /// 选择图片
-//   static Future<List<AssetEntity>?> selectImage(
-//     BuildContext context, {
-//     int maxAssets = 9,
-//     List<AssetEntity>? selected,
-//     int filterMinWidth = 100,
-//     int filterMaxWidth = 100000,
-//     int filterMinHeight = 100,
-//     int filterMaxHeight = 100000,
-//   }) async {
-//     FilterOptionGroup filterOptions = FilterOptionGroup()
-//       ..setOption(
-//         AssetType.image,
-//         FilterOption(
-//           sizeConstraint: SizeConstraint(
-//             minWidth: filterMinWidth,
-//             maxWidth: filterMaxWidth,
-//             minHeight: filterMinHeight,
-//             maxHeight: filterMaxHeight,
-//           ),
-//         ),
-//       );
-//
-//     return AssetPicker.pickAssets(
-//       context,
-//       pickerConfig: AssetPickerConfig(
-//         requestType: RequestType.image,
-//         selectedAssets: selected,
-//         maxAssets: maxAssets,
-//         filterOptions: filterOptions,
-//         gridCount: 4,
-//         pageSize: 40,
-//         pickerTheme: ThemeData(
-//           brightness: Brightness.dark,
-//           appBarTheme: AppBarTheme(
-//             systemOverlayStyle: SystemUiOverlayStyle.dark.copyWith(
-//                     statusBarColor: Colors.transparent,
-//                     statusBarBrightness: Brightness.dark,
-//                     statusBarIconBrightness: Brightness.light,
-//                   ),
-//           ),
-//         ),
-//       ),
-//     );
-//   }
-//
-//   /// 选择视频
-//   static Future<List<AssetEntity>?> selectVideo(
-//     BuildContext context, {
-//     int maxAssets = 1,
-//     List<AssetEntity>? selected,
-//     int filterMinWidth = 100,
-//     int filterMaxWidth = 100000,
-//     int filterMinHeight = 100,
-//     int filterMaxHeight = 100000,
-//     int filterMaxSeconds = 60, //默认能选择60秒以内的视频
-//   }) async {
-//     FilterOptionGroup filterOptions = FilterOptionGroup()
-//       ..setOption(
-//         AssetType.video,
-//         FilterOption(
-//             sizeConstraint: SizeConstraint(
-//               minWidth: filterMinWidth,
-//               maxWidth: filterMaxWidth,
-//               minHeight: filterMinHeight,
-//               maxHeight: filterMaxHeight,
-//             ),
-//             durationConstraint: DurationConstraint(max: Duration(seconds: filterMaxSeconds))),
-//       );
-//
-//     return AssetPicker.pickAssets(
-//       context,
-//       pickerConfig: AssetPickerConfig(
-//         requestType: RequestType.video,
-//         selectedAssets: selected,
-//         maxAssets: maxAssets,
-//         filterOptions: filterOptions,
-//         gridCount: 4,
-//         pageSize: 40,
-//         pickerTheme: ThemeData(
-//           brightness: Brightness.dark,
-//           appBarTheme: AppBarTheme(
-//             systemOverlayStyle: SystemUiOverlayStyle.dark.copyWith(
-//               statusBarColor: Colors.transparent,
-//               statusBarBrightness: Brightness.dark,
-//               statusBarIconBrightness: Brightness.light,
-//             ),
-//           ),
-//         ),
-//       ),
-//     );
-//   }
-// }
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:wechat_assets_picker/wechat_assets_picker.dart';
+
+/*
+ * 本地图库的引擎封装,目前用的 wechat_assets_picker 插件
+ */
+class AlbumEngine {
+  /// 选择图片
+  static Future<List<AssetEntity>?> selectImage(
+    BuildContext context, {
+    int maxAssets = 9,
+    List<AssetEntity>? selected,
+    int filterMinWidth = 100,
+    int filterMaxWidth = 100000,
+    int filterMinHeight = 100,
+    int filterMaxHeight = 100000,
+  }) async {
+    FilterOptionGroup filterOptions = FilterOptionGroup()
+      ..setOption(
+        AssetType.image,
+        FilterOption(
+          sizeConstraint: SizeConstraint(
+            minWidth: filterMinWidth,
+            maxWidth: filterMaxWidth,
+            minHeight: filterMinHeight,
+            maxHeight: filterMaxHeight,
+          ),
+        ),
+      );
+
+    return AssetPicker.pickAssets(
+      context,
+      pickerConfig: AssetPickerConfig(
+        requestType: RequestType.image,
+        selectedAssets: selected,
+        maxAssets: maxAssets,
+        filterOptions: filterOptions,
+        gridCount: 4,
+        pageSize: 40,
+        pickerTheme: ThemeData(
+          brightness: Brightness.dark,
+          appBarTheme: AppBarTheme(
+            systemOverlayStyle: SystemUiOverlayStyle.dark.copyWith(
+                    statusBarColor: Colors.transparent,
+                    statusBarBrightness: Brightness.dark,
+                    statusBarIconBrightness: Brightness.light,
+                  ),
+          ),
+        ),
+      ),
+    );
+  }
+
+  /// 选择视频
+  static Future<List<AssetEntity>?> selectVideo(
+    BuildContext context, {
+    int maxAssets = 1,
+    List<AssetEntity>? selected,
+    int filterMinWidth = 100,
+    int filterMaxWidth = 100000,
+    int filterMinHeight = 100,
+    int filterMaxHeight = 100000,
+    int filterMaxSeconds = 60, //默认能选择60秒以内的视频
+  }) async {
+    FilterOptionGroup filterOptions = FilterOptionGroup()
+      ..setOption(
+        AssetType.video,
+        FilterOption(
+            sizeConstraint: SizeConstraint(
+              minWidth: filterMinWidth,
+              maxWidth: filterMaxWidth,
+              minHeight: filterMinHeight,
+              maxHeight: filterMaxHeight,
+            ),
+            durationConstraint: DurationConstraint(max: Duration(seconds: filterMaxSeconds))),
+      );
+
+    return AssetPicker.pickAssets(
+      context,
+      pickerConfig: AssetPickerConfig(
+        requestType: RequestType.video,
+        selectedAssets: selected,
+        maxAssets: maxAssets,
+        filterOptions: filterOptions,
+        gridCount: 4,
+        pageSize: 40,
+        pickerTheme: ThemeData(
+          brightness: Brightness.dark,
+          appBarTheme: AppBarTheme(
+            systemOverlayStyle: SystemUiOverlayStyle.dark.copyWith(
+              statusBarColor: Colors.transparent,
+              statusBarBrightness: Brightness.dark,
+              statusBarIconBrightness: Brightness.light,
+            ),
+          ),
+        ),
+      ),
+    );
+  }
+}

+ 56 - 57
packages/cs_plugin_platform/lib/engine/media/camera_engine.dart

@@ -1,57 +1,56 @@
-// import 'package:flutter/material.dart';
-// import 'package:wechat_camera_picker/wechat_camera_picker.dart';
-// import 'package:flutter/services.dart';
-// import 'package:get/get.dart';
-//
-// /*
-//  * 照相机的引擎封装,目前用的 CameraPicker 插件
-//  */
-// class CameraEngine {
-//   /// 拍照
-//   static Future<AssetEntity?> takePhoto(BuildContext context) async {
-//     return await CameraPicker.pickFromCamera(
-//       context,
-//       pickerConfig: CameraPickerConfig(
-//         enableRecording: false,
-//         theme: ThemeData(
-//           brightness: Brightness.dark,
-//           appBarTheme: AppBarTheme(
-//             systemOverlayStyle: SystemUiOverlayStyle.dark.copyWith(
-//               statusBarColor: Colors.transparent,
-//               statusBarBrightness: Brightness.dark,
-//               statusBarIconBrightness: Brightness.light,
-//             ),
-//           ),
-//         ),
-//       ),
-//     );
-//   }
-//
-//   /// 录制视频
-//   static Future<AssetEntity?> takeVideo(
-//     BuildContext context, {
-//     int maxRecordInSeconds = 30,
-//   }) async {
-//     return await CameraPicker.pickFromCamera(
-//       context,
-//       pickerConfig: CameraPickerConfig(
-//         enableRecording: true,
-//         onlyEnableRecording: true,
-//         enableTapRecording: false,
-//         enableAudio: true,
-//         shouldAutoPreviewVideo: true,
-//         maximumRecordingDuration: Duration(seconds: maxRecordInSeconds),
-//         theme: ThemeData(
-//           brightness: Brightness.dark,
-//           appBarTheme: AppBarTheme(
-//             systemOverlayStyle: SystemUiOverlayStyle.dark.copyWith(
-//               statusBarColor: Colors.transparent,
-//               statusBarBrightness: Brightness.dark,
-//               statusBarIconBrightness: Brightness.light,
-//             ),
-//           ),
-//         ),
-//       ),
-//     );
-//   }
-// }
+import 'package:flutter/material.dart';
+import 'package:wechat_camera_picker/wechat_camera_picker.dart';
+import 'package:flutter/services.dart';
+
+/*
+ * 照相机的引擎封装,目前用的 CameraPicker 插件
+ */
+class CameraEngine {
+  /// 拍照
+  static Future<AssetEntity?> takePhoto(BuildContext context) async {
+    return await CameraPicker.pickFromCamera(
+      context,
+      pickerConfig: CameraPickerConfig(
+        enableRecording: false,
+        theme: ThemeData(
+          brightness: Brightness.dark,
+          appBarTheme: AppBarTheme(
+            systemOverlayStyle: SystemUiOverlayStyle.dark.copyWith(
+              statusBarColor: Colors.transparent,
+              statusBarBrightness: Brightness.dark,
+              statusBarIconBrightness: Brightness.light,
+            ),
+          ),
+        ),
+      ),
+    );
+  }
+
+  /// 录制视频
+  static Future<AssetEntity?> takeVideo(
+    BuildContext context, {
+    int maxRecordInSeconds = 30,
+  }) async {
+    return await CameraPicker.pickFromCamera(
+      context,
+      pickerConfig: CameraPickerConfig(
+        enableRecording: true,
+        onlyEnableRecording: true,
+        enableTapRecording: false,
+        enableAudio: true,
+        shouldAutoPreviewVideo: true,
+        maximumRecordingDuration: Duration(seconds: maxRecordInSeconds),
+        theme: ThemeData(
+          brightness: Brightness.dark,
+          appBarTheme: AppBarTheme(
+            systemOverlayStyle: SystemUiOverlayStyle.dark.copyWith(
+              statusBarColor: Colors.transparent,
+              statusBarBrightness: Brightness.dark,
+              statusBarIconBrightness: Brightness.light,
+            ),
+          ),
+        ),
+      ),
+    );
+  }
+}

+ 41 - 43
packages/cs_plugin_platform/lib/engine/media/image_crop_engine.dart

@@ -1,43 +1,41 @@
-// import 'package:flutter/material.dart';
-//
-// import 'package:get/get.dart';
-// import 'package:image_cropper/image_cropper.dart';
-//
-// /*
-//  * 图片裁剪引擎封装,目前使用的是 UCorp 框架
-//  */
-// class ImageCropEngine {
-//   /// 开启图片裁剪 - 返回裁剪后的图片的路径 (默认裁剪后的路径在App/Data/Cache目录下)
-//   static Future<String?> imageCrop(
-//     BuildContext context,
-//     String filePath, {
-//     CropAspectRatioPreset aspect = CropAspectRatioPreset.square,
-//   }) async {
-//     CroppedFile? croppedFile = await ImageCropper().cropImage(
-//       sourcePath: filePath,
-//       aspectRatioPresets: [
-//         aspect,
-//       ],
-//       uiSettings: [
-//         AndroidUiSettings(
-//             toolbarTitle: '图片裁剪'.tr,
-//             toolbarColor: const Color(0xff212121),
-//             statusBarColor: const Color(0xff212121),
-//             toolbarWidgetColor: Colors.white,
-//             initAspectRatio: CropAspectRatioPreset.original,
-//             lockAspectRatio: false),
-//         IOSUiSettings(
-//           title: '图片裁剪'.tr,
-//         ),
-//         WebUiSettings(
-//           context: context,
-//         ),
-//       ],
-//     );
-//
-//     if (croppedFile != null) {
-//       return croppedFile.path;
-//     }
-//     return null;
-//   }
-// }
+import 'package:flutter/material.dart';
+import 'package:image_cropper/image_cropper.dart';
+
+/*
+ * 图片裁剪引擎封装,目前使用的是 UCorp 框架
+ */
+class ImageCropEngine {
+  /// 开启图片裁剪 - 返回裁剪后的图片的路径 (默认裁剪后的路径在App/Data/Cache目录下)
+  static Future<String?> imageCrop(
+    BuildContext context,
+    String filePath, {
+    CropAspectRatioPreset aspect = CropAspectRatioPreset.square,
+  }) async {
+    CroppedFile? croppedFile = await ImageCropper().cropImage(
+      sourcePath: filePath,
+      aspectRatioPresets: [
+        aspect,
+      ],
+      uiSettings: [
+        AndroidUiSettings(
+            toolbarTitle: 'Image Crop',
+            toolbarColor: const Color(0xff212121),
+            statusBarColor: const Color(0xff212121),
+            toolbarWidgetColor: Colors.white,
+            initAspectRatio: CropAspectRatioPreset.original,
+            lockAspectRatio: false),
+        IOSUiSettings(
+          title: 'Image Crop',
+        ),
+        WebUiSettings(
+          context: context,
+        ),
+      ],
+    );
+
+    if (croppedFile != null) {
+      return croppedFile.path;
+    }
+    return null;
+  }
+}

+ 101 - 102
packages/cs_plugin_platform/lib/engine/media/image_picker_utils.dart

@@ -1,102 +1,101 @@
-// import 'package:flutter/material.dart';
-// import 'package:get/get.dart';
-// import 'package:image_cropper/image_cropper.dart';
-// import 'package:wechat_assets_picker/wechat_assets_picker.dart';
-// import 'package:widgets/dialog/album_default_select_dialog.dart';
-//
-// import '../permission/permission_engine.dart';
-// import 'album_engine.dart';
-// import 'camera_engine.dart';
-// import '../dialog/dialog_engine.dart';
-// import 'image_crop_engine.dart';
-//
-//
-// /*
-//     相机相册选择的封装
-//
-//     1.相机相册的选择弹框
-//     2.相机相册权限提示详情描述弹窗
-//     3.调用相机相册的引擎封装类 CameraEngine  AlbumEngine  ImageCropEngine 的使用
-//  */
-// class ImagePickerUtils {
-//   // 私有构造函数
-//   ImagePickerUtils._privateConstructor();
-//
-//   // 单例实例
-//   static final ImagePickerUtils _instance = ImagePickerUtils._privateConstructor();
-//
-//   // 获取单例实例的访问点
-//   factory ImagePickerUtils() {
-//     return _instance;
-//   }
-//
-//   /// 入口
-//   void show(
-//     void Function(String filePath) complete, {
-//     bool isCropped = false,
-//     CropAspectRatioPreset aspect = CropAspectRatioPreset.square,
-//   }) {
-//     DialogEngine.show(
-//         position: DialogPosition.bottom,
-//         widget: AlbumDefaultSelectDialog(cameraAction: () {
-//           //相机的选项
-//           PermissionEngine().requestCameraPermission(() {
-//             //调用相机引擎读取图片
-//             _selectFormCamera(Get.context!, (filePath) {
-//               complete(filePath);
-//             }, isCropped: isCropped, aspect: aspect);
-//           });
-//         }, albumAction: () {
-//           //相册的选项
-//           PermissionEngine().requestPhotosPermission(() {
-//             //调用相册引擎读取图片
-//             _selectFormAlbum(Get.context!, (filePath) {
-//               complete(filePath);
-//             }, isCropped: isCropped, aspect: aspect);
-//           });
-//         }));
-//   }
-//
-//   /// 从相机中选择
-//   Future _selectFormCamera(
-//     BuildContext context,
-//     void Function(String filePath) complete, {
-//     bool isCropped = false,
-//     CropAspectRatioPreset aspect = CropAspectRatioPreset.square,
-//   }) async {
-//     final AssetEntity? result = await CameraEngine.takePhoto(context);
-//
-//     if (result != null) {
-//       final file = await result.file;
-//       final filePath = file?.path;
-//
-//       if (filePath != null && isCropped == true) {
-//         final croppedPath = await ImageCropEngine.imageCrop(context, filePath, aspect: aspect);
-//         complete(croppedPath!);
-//       } else {
-//         complete(filePath!);
-//       }
-//     }
-//   }
-//
-//   /// 从相册中选择
-//   Future _selectFormAlbum(
-//     BuildContext context,
-//     void Function(String filePath) complete, {
-//     bool isCropped = false,
-//     CropAspectRatioPreset aspect = CropAspectRatioPreset.square,
-//   }) async {
-//     final List<AssetEntity>? result = await AlbumEngine.selectImage(context, maxAssets: 1);
-//     if (result != null && result.isNotEmpty) {
-//       final file = await result[0].file;
-//       final filePath = file?.path;
-//
-//       if (filePath != null && isCropped == true) {
-//         final croppedPath = await ImageCropEngine.imageCrop(context, filePath, aspect: aspect);
-//         complete(croppedPath!);
-//       } else {
-//         complete(filePath!);
-//       }
-//     }
-//   }
-// }
+import 'package:flutter/material.dart';
+import 'package:image_cropper/image_cropper.dart';
+import 'package:wechat_assets_picker/wechat_assets_picker.dart';
+import 'package:widgets/dialog/album_default_select_dialog.dart';
+
+import '../permission/permission_engine.dart';
+import 'album_engine.dart';
+import 'camera_engine.dart';
+import '../dialog/dialog_engine.dart';
+import 'image_crop_engine.dart';
+
+/*
+    相机相册选择的封装
+
+    1.相机相册的选择弹框
+    2.相机相册权限提示详情描述弹窗
+    3.调用相机相册的引擎封装类 CameraEngine  AlbumEngine  ImageCropEngine 的使用
+ */
+class ImagePickerUtils {
+  // 私有构造函数
+  ImagePickerUtils._privateConstructor();
+
+  // 单例实例
+  static final ImagePickerUtils _instance = ImagePickerUtils._privateConstructor();
+
+  // 获取单例实例的访问点
+  factory ImagePickerUtils() {
+    return _instance;
+  }
+
+  /// 入口
+  void show(
+    BuildContext context,
+    void Function(String filePath) complete, {
+    bool isCropped = false,
+    CropAspectRatioPreset aspect = CropAspectRatioPreset.square,
+  }) {
+    DialogEngine.show(
+        position: DialogPosition.bottom,
+        widget: AlbumDefaultSelectDialog(cameraAction: () {
+          //相机的选项
+          PermissionEngine().requestCameraPermission(() {
+            //调用相机引擎读取图片
+            _selectFormCamera(context, (filePath) {
+              complete(filePath);
+            }, isCropped: isCropped, aspect: aspect);
+          });
+        }, albumAction: () {
+          //相册的选项
+          PermissionEngine().requestPhotosPermission(() {
+            //调用相册引擎读取图片
+            _selectFormAlbum(context, (filePath) {
+              complete(filePath);
+            }, isCropped: isCropped, aspect: aspect);
+          });
+        }));
+  }
+
+  /// 从相机中选择
+  Future _selectFormCamera(
+    BuildContext context,
+    void Function(String filePath) complete, {
+    bool isCropped = false,
+    CropAspectRatioPreset aspect = CropAspectRatioPreset.square,
+  }) async {
+    final AssetEntity? result = await CameraEngine.takePhoto(context);
+
+    if (result != null) {
+      final file = await result.file;
+      final filePath = file?.path;
+
+      if (filePath != null && isCropped == true) {
+        final croppedPath = await ImageCropEngine.imageCrop(context, filePath, aspect: aspect);
+        complete(croppedPath!);
+      } else {
+        complete(filePath!);
+      }
+    }
+  }
+
+  /// 从相册中选择
+  Future _selectFormAlbum(
+    BuildContext context,
+    void Function(String filePath) complete, {
+    bool isCropped = false,
+    CropAspectRatioPreset aspect = CropAspectRatioPreset.square,
+  }) async {
+    final List<AssetEntity>? result = await AlbumEngine.selectImage(context, maxAssets: 1);
+    if (result != null && result.isNotEmpty) {
+      final file = await result[0].file;
+      final filePath = file?.path;
+
+      if (filePath != null && isCropped == true) {
+        final croppedPath = await ImageCropEngine.imageCrop(context, filePath, aspect: aspect);
+        complete(croppedPath!);
+      } else {
+        complete(filePath!);
+      }
+    }
+  }
+}

+ 207 - 199
packages/cs_plugin_platform/lib/engine/permission/permission_engine.dart

@@ -1,199 +1,207 @@
-//
-// import 'package:flutter/material.dart';
-// import 'package:permission_handler/permission_handler.dart';
-// import 'package:photo_manager/photo_manager.dart';
-// import 'package:shared/utils/device_utils.dart';
-// import 'package:shared/utils/log_utils.dart';
-// import 'package:widgets/dialog/app_default_dialog.dart';
-// import 'package:widgets/dialog/permission_desc_dialog.dart';
-//
-// import '../dialog/dialog_engine.dart';
-//
-//
-// /**
-//  * 动态权限的申请与校验
-//  */
-// class PermissionEngine {
-//   // 私有构造函数
-//   PermissionEngine._privateConstructor();
-//
-//   // 单例实例
-//   static final PermissionEngine _instance = PermissionEngine._privateConstructor();
-//
-//   // 获取单例实例的访问点
-//   factory PermissionEngine() {
-//     return _instance;
-//   }
-//
-//   /// 申请多媒体相册权限
-//   void requestPhotosPermission(void Function() success) async {
-//     //相册的选项
-//     if (DeviceUtils.isIOS) {
-//       //申请授权
-//       final value = await PhotoManager.requestPermissionExtend();
-//       if (value.hasAccess) {
-//         //已授权
-//         Log.d("相册已授权");
-//         success();
-//       } else if (value == PermissionState.limited) {
-//         Log.d("相册访问受限,去设置受限");
-//         PhotoManager.presentLimited();
-//       } else {
-//         Log.d("相册无授权,去设置");
-//         DialogEngine.show(
-//           widget: AppDefaultDialog(
-//             "无相册权限,前往设置",
-//             confirmAction: () {
-//               PhotoManager.openSetting();
-//             },
-//           ),
-//         );
-//       }
-//     } else {
-//       //Android是否有SD卡权限
-//       var status = await Permission.storage.status;
-//       late PermissionState ps;
-//       if (status.isGranted) {
-//         // 已经授权
-//         success();
-//       } else {
-//         // 未授权,则准备发起一次申请
-//         var permissionRequestFuture = PhotoManager.requestPermissionExtend();
-//
-//         // 延迟500毫秒的Future
-//         var delayFuture = Future.delayed(Duration(milliseconds: 500), () => 'delay');
-//
-//         // 使用Future.any等待上述两个Future中的任何一个完成
-//         var firstCompleted = await Future.any([permissionRequestFuture, delayFuture]);
-//
-//         // 判断响应结果
-//         if (firstCompleted == 'delay') {
-//           Log.d("判断响应结果:1");
-//           // 如果是延迟Future完成了,表示500毫秒内没有获得权限响应,显示对话框
-//           _showPermissionDialog("“YYBusiness”想访问你的多媒体相册 用于图片上传,图片保存等功能,请允许我获取您的权限");
-//           // 再次等待权限请求结果
-//           ps = await permissionRequestFuture;
-//           DialogEngine.dismiss(tag: "permission");
-//         } else {
-//           Log.d("判断响应结果:2");
-//           // 权限请求已完成,立刻取消对话框展示(如果已经展示的话)
-//           DialogEngine.dismiss(tag: "permission");
-//           ps = firstCompleted as PermissionState;
-//         }
-//
-//         if (ps.isAuth) {
-//           // 用户授权
-//           success();
-//         } else {
-//           // 权限被拒绝
-//           await DialogEngine.show(
-//             widget: AppDefaultDialog("请到您的手机设置打开相册的权限", title: "提醒", confirmText: "去设置", confirmAction: () {
-//               openAppSettings();
-//             }),
-//           );
-//         }
-//       }
-//     }
-//   }
-//
-//   /// 申请相机权限
-//   void requestCameraPermission(void Function() success) async {
-//     // 获取当前的权限
-//     var status = await Permission.camera.status;
-//     if (status.isGranted) {
-//       // 已经授权
-//       success();
-//     } else {
-//       // 未授权,则准备发起一次申请
-//       var permissionRequestFuture = Permission.camera.request();
-//
-//       // 延迟500毫秒的Future
-//       var delayFuture = Future.delayed(Duration(milliseconds: 500), () => 'delay');
-//
-//       // 使用Future.any等待上述两个Future中的任何一个完成
-//       var firstCompleted = await Future.any([permissionRequestFuture, delayFuture]);
-//
-//       // 判断响应结果
-//       if (firstCompleted == 'delay') {
-//         // 如果是延迟Future完成了,表示500毫秒内没有获得权限响应,显示对话框
-//         _showPermissionDialog("“YYBusiness”申请调用您的相机权限 用于使用拍摄头像,图片上传保存等功能,请允许我获取您的权限");
-//         // 再次等待权限请求结果
-//         status = await permissionRequestFuture;
-//         DialogEngine.dismiss(tag: "permission");
-//       } else {
-//         // 权限请求已完成,立刻取消对话框展示(如果已经展示的话)
-//         DialogEngine.dismiss(tag: "permission");
-//         status = firstCompleted as PermissionStatus;
-//       }
-//
-//       if (status.isGranted) {
-//         // 用户授权
-//         success();
-//       } else {
-//         // 权限被拒绝
-//         await DialogEngine.show(
-//           widget: AppDefaultDialog("请到您的手机设置打开相机的权限", title: "提醒", confirmText: "去设置", confirmAction: () {
-//             openAppSettings();
-//           }),
-//         );
-//       }
-//     }
-//   }
-//
-//   /// 校验并申请定位权限
-//   Future<bool> requestLocationPermission() async {
-//     // 获取当前的权限
-//     var status = await Permission.location.status;
-//     if (status.isGranted) {
-//       // 已经授权
-//       return true;
-//     } else {
-//       // 未授权,则准备发起一次申请
-//       var permissionRequestFuture = Permission.location.request();
-//
-//       // 延迟500毫秒的Future
-//       var delayFuture = Future.delayed(Duration(milliseconds: 500), () => 'delay');
-//
-//       // 使用Future.any等待上述两个Future中的任何一个完成
-//       var firstCompleted = await Future.any([permissionRequestFuture, delayFuture]);
-//
-//       // 判断响应结果
-//       if (firstCompleted == 'delay') {
-//         // 如果是延迟Future完成了,表示500毫秒内没有获得权限响应,显示对话框
-//         _showPermissionDialog("“YYBusiness”想访问您的定位权限获取您的位置来推荐附近的工作");
-//         // 再次等待权限请求结果
-//         status = await permissionRequestFuture;
-//         DialogEngine.dismiss(tag: "permission");
-//       } else {
-//         Log.d("权限请求已完成,立刻取消对话框展示");
-//         // 权限请求已完成,立刻取消对话框展示(如果已经展示的话)
-//         DialogEngine.dismiss(tag: "permission");
-//         status = firstCompleted as PermissionStatus;
-//       }
-//
-//       if (status.isGranted) {
-//         // 用户授权
-//         return true;
-//       } else {
-//         // 权限被拒绝
-//         await DialogEngine.show(
-//           widget: AppDefaultDialog("请到您的手机设置打开定位的权限", title: "提醒", confirmText: "去设置", confirmAction: () {
-//             openAppSettings();
-//           }),
-//         );
-//         return false;
-//       }
-//     }
-//   }
-//
-//   //顶部展示权限声明详情弹窗
-//   void _showPermissionDialog(String desc) {
-//     DialogEngine.show(
-//       clickMaskDismiss: false,
-//       backDismiss: true,
-//       tag: "permission",
-//       maskColor: Colors.transparent,
-//       widget: PermissionDescDialog(desc),
-//     );
-//   }
-// }
+import 'package:flutter/material.dart';
+import 'package:permission_handler/permission_handler.dart';
+import 'package:photo_manager/photo_manager.dart';
+import 'package:shared/utils/device_utils.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:widgets/dialog/app_default_dialog.dart';
+import 'package:widgets/dialog/permission_desc_dialog.dart';
+
+import '../dialog/dialog_engine.dart';
+
+/*
+ * 动态权限的申请与校验
+ */
+class PermissionEngine {
+  // 私有构造函数
+  PermissionEngine._privateConstructor();
+
+  // 单例实例
+  static final PermissionEngine _instance = PermissionEngine._privateConstructor();
+
+  // 获取单例实例的访问点
+  factory PermissionEngine() {
+    return _instance;
+  }
+
+  /// 申请多媒体相册权限
+  void requestPhotosPermission(void Function() success) async {
+    //相册的选项
+    if (DeviceUtils.isIOS) {
+      //申请授权
+      final value = await PhotoManager.requestPermissionExtend();
+      if (value.hasAccess) {
+        //已授权
+        Log.d("相册已授权");
+        success();
+      } else if (value == PermissionState.limited) {
+        Log.d("相册访问受限,去设置受限");
+        PhotoManager.presentLimited();
+      } else {
+        Log.d("相册无授权,去设置");
+        DialogEngine.show(
+          widget: AppDefaultDialog(
+            title: "提示",
+            message: '无相册权限,前往设置',
+            confirmAction: () {
+              PhotoManager.openSetting();
+            },
+          ),
+        );
+      }
+    } else {
+      //Android是否有SD卡权限
+      var status = await Permission.storage.status;
+      late PermissionState ps;
+      if (status.isGranted) {
+        // 已经授权
+        success();
+      } else {
+        // 未授权,则准备发起一次申请
+        var permissionRequestFuture = PhotoManager.requestPermissionExtend();
+
+        // 延迟500毫秒的Future
+        var delayFuture = Future.delayed(Duration(milliseconds: 500), () => 'delay');
+
+        // 使用Future.any等待上述两个Future中的任何一个完成
+        var firstCompleted = await Future.any([permissionRequestFuture, delayFuture]);
+
+        // 判断响应结果
+        if (firstCompleted == 'delay') {
+          Log.d("判断响应结果:1");
+          // 如果是延迟Future完成了,表示500毫秒内没有获得权限响应,显示对话框
+          _showPermissionDialog("“YYBusiness”想访问你的多媒体相册 用于图片上传,图片保存等功能,请允许我获取您的权限");
+          // 再次等待权限请求结果
+          ps = await permissionRequestFuture;
+          DialogEngine.dismiss(tag: "permission");
+        } else {
+          Log.d("判断响应结果:2");
+          // 权限请求已完成,立刻取消对话框展示(如果已经展示的话)
+          DialogEngine.dismiss(tag: "permission");
+          ps = firstCompleted as PermissionState;
+        }
+
+        if (ps.isAuth) {
+          // 用户授权
+          success();
+        } else {
+          // 权限被拒绝
+          await DialogEngine.show(
+            widget: AppDefaultDialog(
+                message: "请到您的手机设置打开相册的权限",
+                title: "提醒",
+                confirmAction: () {
+                  openAppSettings();
+                }),
+          );
+        }
+      }
+    }
+  }
+
+  /// 申请相机权限
+  void requestCameraPermission(void Function() success) async {
+    // 获取当前的权限
+    var status = await Permission.camera.status;
+    if (status.isGranted) {
+      // 已经授权
+      success();
+    } else {
+      // 未授权,则准备发起一次申请
+      var permissionRequestFuture = Permission.camera.request();
+
+      // 延迟500毫秒的Future
+      var delayFuture = Future.delayed(Duration(milliseconds: 500), () => 'delay');
+
+      // 使用Future.any等待上述两个Future中的任何一个完成
+      var firstCompleted = await Future.any([permissionRequestFuture, delayFuture]);
+
+      // 判断响应结果
+      if (firstCompleted == 'delay') {
+        // 如果是延迟Future完成了,表示500毫秒内没有获得权限响应,显示对话框
+        _showPermissionDialog("“YYBusiness”申请调用您的相机权限 用于使用拍摄头像,图片上传保存等功能,请允许我获取您的权限");
+        // 再次等待权限请求结果
+        status = await permissionRequestFuture;
+        DialogEngine.dismiss(tag: "permission");
+      } else {
+        // 权限请求已完成,立刻取消对话框展示(如果已经展示的话)
+        DialogEngine.dismiss(tag: "permission");
+        status = firstCompleted as PermissionStatus;
+      }
+
+      if (status.isGranted) {
+        // 用户授权
+        success();
+      } else {
+        // 权限被拒绝
+        await DialogEngine.show(
+          widget: AppDefaultDialog(
+              message: "请到您的手机设置打开相机的权限",
+              title: "提醒",
+              confirmAction: () {
+                openAppSettings();
+              }),
+        );
+      }
+    }
+  }
+
+  /// 校验并申请定位权限
+  Future<bool> requestLocationPermission() async {
+    // 获取当前的权限
+    var status = await Permission.location.status;
+    if (status.isGranted) {
+      // 已经授权
+      return true;
+    } else {
+      // 未授权,则准备发起一次申请
+      var permissionRequestFuture = Permission.location.request();
+
+      // 延迟500毫秒的Future
+      var delayFuture = Future.delayed(Duration(milliseconds: 500), () => 'delay');
+
+      // 使用Future.any等待上述两个Future中的任何一个完成
+      var firstCompleted = await Future.any([permissionRequestFuture, delayFuture]);
+
+      // 判断响应结果
+      if (firstCompleted == 'delay') {
+        // 如果是延迟Future完成了,表示500毫秒内没有获得权限响应,显示对话框
+        _showPermissionDialog("“YYBusiness”想访问您的定位权限获取您的位置来推荐附近的工作");
+        // 再次等待权限请求结果
+        status = await permissionRequestFuture;
+        DialogEngine.dismiss(tag: "permission");
+      } else {
+        Log.d("权限请求已完成,立刻取消对话框展示");
+        // 权限请求已完成,立刻取消对话框展示(如果已经展示的话)
+        DialogEngine.dismiss(tag: "permission");
+        status = firstCompleted as PermissionStatus;
+      }
+
+      if (status.isGranted) {
+        // 用户授权
+        return true;
+      } else {
+        // 权限被拒绝
+        await DialogEngine.show(
+          widget: AppDefaultDialog(
+              message: "请到您的手机设置打开定位的权限",
+              title: "提醒",
+              confirmAction: () {
+                openAppSettings();
+              }),
+        );
+        return false;
+      }
+    }
+  }
+
+  //顶部展示权限声明详情弹窗
+  void _showPermissionDialog(String desc) {
+    DialogEngine.show(
+      clickMaskDismiss: false,
+      backDismiss: true,
+      tag: "permission",
+      maskColor: Colors.transparent,
+      widget: PermissionDescDialog(desc),
+    );
+  }
+}

+ 2 - 0
packages/cs_plugin_platform/lib/platform_export.dart

@@ -0,0 +1,2 @@
+export 'package:dio/dio.dart';
+export 'package:permission_handler/permission_handler.dart';

+ 5 - 5
packages/cs_plugin_platform/pubspec.yaml

@@ -38,23 +38,23 @@ dependencies:
   permission_handler: 11.3.1
 
   # 图片选择  https://github.com/fluttercandies/flutter_wechat_assets_picker/blob/main/README-ZH.md
-#  wechat_assets_picker: 9.0.2
+  wechat_assets_picker: ^9.2.2
   # 图片加载框架 https://github.com/fluttercandies/extended_image/blob/master/README-ZH.md
   # 封装在 MyLoadImage 控件中,推荐图片全部用 MyLoadImage
-  # wechat_assets_picker 内部已经依赖了 extended_image 框架!无需再次依赖
+  # wechatAssetsPicker 内部已经依赖了 extended_image 框架!无需再次依赖
 
   # 相机选择器 https://github.com/fluttercandies/flutter_wechat_camera_picker/blob/main/README-ZH.md
   # 与上面图片选择配套的相机模块,基于 wechat_assets_picker 与 camera 依赖实现的
-#  wechat_camera_picker: 4.2.1
+  wechat_camera_picker: ^4.3.4
 
   # 图片裁剪  https://github.com/hnvn/flutter_image_cropper
   # 与上面图片选择或相机拍照结合使用,裁剪图片为1:1或4:3或16:9的比例
-#  image_cropper: 5.0.1
+  image_cropper: 5.0.1
 
   # 图片压缩 https://github.com/fluttercandies/flutter_image_compress
   #          https://pub.dev/packages/flutter_image_compress
   # 用于最终的图片压缩,在网络请求上传文件的基类 ApiProvider 中统一处理图片的压缩逻辑,业务层不需要处理
-  flutter_image_compress: 2.2.0
+  flutter_image_compress: 2.3.0
 
   # 弹窗控件 https://github.com/CNAD666/flutter_smart_dialog
   # 内部包含吐司气泡 弹窗 下拉选等