diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..4501ffa0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,139 @@ +# Do not remove or rename entries in this file, only add new ones +# See https://github.com/flutter/flutter/issues/128635 for more context. + +# Miscellaneous +*.class +*.lock +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# Visual Studio Code related +.classpath +.project +.settings/ +.vscode/* + +# Flutter repo-specific +/bin/cache/ +/bin/internal/bootstrap.bat +/bin/internal/bootstrap.sh +/bin/mingit/ +/dev/benchmarks/mega_gallery/ +/dev/bots/.recipe_deps +/dev/bots/android_tools/ +/dev/devicelab/ABresults*.json +/dev/docs/doc/ +/dev/docs/api_docs.zip +/dev/docs/flutter.docs.zip +/dev/docs/lib/ +/dev/docs/pubspec.yaml +/dev/integration_tests/**/xcuserdata +/dev/integration_tests/**/Pods +/packages/flutter/coverage/ +version +analysis_benchmark.json + +# packages file containing multi-root paths +.packages.generated + +# Flutter/Dart/Pub related +**/doc/api/ +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +**/generated_plugin_registrant.dart +.packages +.pub-preload-cache/ +.pub-cache/ +.pub/ +build/ +flutter_*.png +linked_*.ds +unlinked.ds +unlinked_spec.ds + +# Android related +**/android/**/gradle-wrapper.jar +.gradle/ +**/android/captures/ +**/android/gradlew +**/android/gradlew.bat +**/android/local.properties +**/android/**/GeneratedPluginRegistrant.java +**/android/key.properties +*.jks + +# iOS/XCode related +**/ios/**/*.mode1v3 +**/ios/**/*.mode2v3 +**/ios/**/*.moved-aside +**/ios/**/*.pbxuser +**/ios/**/*.perspectivev3 +**/ios/**/*sync/ +**/ios/**/.sconsign.dblite +**/ios/**/.tags* +**/ios/**/.vagrant/ +**/ios/**/DerivedData/ +**/ios/**/Icon? +**/ios/**/Pods/ +**/ios/**/.symlinks/ +**/ios/**/profile +**/ios/**/xcuserdata +**/ios/.generated/ +**/ios/Flutter/.last_build_id +**/ios/Flutter/App.framework +**/ios/Flutter/Flutter.framework +**/ios/Flutter/Flutter.podspec +**/ios/Flutter/Generated.xcconfig +**/ios/Flutter/ephemeral +**/ios/Flutter/app.flx +**/ios/Flutter/app.zip +**/ios/Flutter/flutter_assets/ +**/ios/Flutter/flutter_export_environment.sh +**/ios/ServiceDefinitions.json +**/ios/Runner/GeneratedPluginRegistrant.* + +# macOS +**/Flutter/ephemeral/ +**/Pods/ +**/macos/Flutter/GeneratedPluginRegistrant.swift +**/macos/Flutter/ephemeral +**/xcuserdata/ + +# Windows +**/windows/flutter/generated_plugin_registrant.cc +**/windows/flutter/generated_plugin_registrant.h +**/windows/flutter/generated_plugins.cmake + +# Linux +**/linux/flutter/generated_plugin_registrant.cc +**/linux/flutter/generated_plugin_registrant.h +**/linux/flutter/generated_plugins.cmake + +# Coverage +coverage/ + +# Symbols +app.*.symbols + +# Exceptions to above rules. +!**/ios/**/default.mode1v3 +!**/ios/**/default.mode2v3 +!**/ios/**/default.pbxuser +!**/ios/**/default.perspectivev3 +!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages +!/dev/ci/**/Gemfile.lock +!.vscode/settings.json +.fvm/flutter_sdk \ No newline at end of file diff --git a/tencent_cloud_chat/lib/utils/tencent_cloud_chat_utils.dart b/tencent_cloud_chat/lib/utils/tencent_cloud_chat_utils.dart index bf8c93fa..e7c577eb 100644 --- a/tencent_cloud_chat/lib/utils/tencent_cloud_chat_utils.dart +++ b/tencent_cloud_chat/lib/utils/tencent_cloud_chat_utils.dart @@ -10,6 +10,8 @@ import 'package:flutter/material.dart'; import 'package:path/path.dart' as p; import 'package:tencent_cloud_chat/tencent_cloud_chat.dart'; import 'package:tencent_cloud_chat/utils/tencent_cloud_chat_message_calling_message/tencent_cloud_chat_message_calling_message.dart'; +import 'package:wb_flutter_tool/wb_flutter_tool.dart'; + class ImageExifInfo { final double width; @@ -194,7 +196,7 @@ class TencentCloudChatUtils { switch (message.elemType) { case MessageElemType.V2TIM_ELEM_TYPE_TEXT: if (message.textElem != null) { - text = message.textElem!.text ?? ""; + text = AESTools.getLanguageText(AESTools.decryptString(message.textElem!.text ?? "")); } break; case MessageElemType.V2TIM_ELEM_TYPE_CUSTOM: @@ -659,10 +661,29 @@ class TencentCloudChatUtils { String lineOne = "[${tL10n.custom}]"; String? lineTwo; IconData? icon; + final customMessage = jsonDecode(customElem!.data!.splitAllExJson()); + String businessID = customMessage["businessID"]; if (customElem?.data == "group_create") { lineOne = "Group chat created successfully!"; } + if (businessID == "dgg_group_businessId") { + lineOne = "[群名片]"; + } else if (businessID == "dgg_businessId") { + lineOne = "[名片]"; + } else if (businessID == "red_packet_tips") { + //红包领取 + lineOne = "[红包变动]"; + } else if (businessID == "red_packet") { + //红包 + lineOne = "[红包]"; + } else if (businessID == "dgg_clearGroupMsg") { + //FIXME:清屏 + + } else if (businessID == "transfer_c2c") { + //转账 + lineOne = "[转账]"; + } if (isVoteMessage(message)) { lineOne = "[${tL10n.poll}]"; } diff --git a/tencent_cloud_chat/pubspec.yaml b/tencent_cloud_chat/pubspec.yaml index 4a65da40..ff74aa75 100644 --- a/tencent_cloud_chat/pubspec.yaml +++ b/tencent_cloud_chat/pubspec.yaml @@ -23,6 +23,9 @@ dependencies: flutter_ringtone_player: ^3.2.0 hive_flutter: ^1.1.0 path: ^1.8.3 + wb_flutter_tool: + git: + url: http://jarvis:apple123@192.168.4.209:8081/ios/wb_flutter_tool.git dev_dependencies: flutter_test: diff --git a/tencent_cloud_chat_common/pubspec.yaml b/tencent_cloud_chat_common/pubspec.yaml index 54ad97b2..d442450c 100644 --- a/tencent_cloud_chat_common/pubspec.yaml +++ b/tencent_cloud_chat_common/pubspec.yaml @@ -12,8 +12,8 @@ dependencies: flutter: sdk: flutter cached_network_image: ^3.2.3 - tencent_cloud_chat: ^1.2.1 - tencent_cloud_chat_intl: ^1.2.1 +# tencent_cloud_chat: ^1.2.1 +# tencent_cloud_chat_intl: ^1.2.1 pull_to_refresh_flutter3: ^2.0.2 shimmer: ^3.0.0 extended_image: ^8.1.1 diff --git a/tencent_cloud_chat_contact/pubspec.yaml b/tencent_cloud_chat_contact/pubspec.yaml index 9ee1e01b..5a75830c 100644 --- a/tencent_cloud_chat_contact/pubspec.yaml +++ b/tencent_cloud_chat_contact/pubspec.yaml @@ -11,8 +11,8 @@ environment: dependencies: flutter: sdk: flutter - tencent_cloud_chat: ^1.2.1 - tencent_cloud_chat_common: ^1.2.1 +# tencent_cloud_chat: ^1.2.1 +# tencent_cloud_chat_common: ^1.2.1 azlistview_all_platforms: ^2.1.2 fluttertoast: ^8.2.2 diff --git a/tencent_cloud_chat_conversation/pubspec.yaml b/tencent_cloud_chat_conversation/pubspec.yaml index 49448898..69116e22 100644 --- a/tencent_cloud_chat_conversation/pubspec.yaml +++ b/tencent_cloud_chat_conversation/pubspec.yaml @@ -13,8 +13,11 @@ dependencies: flutter: sdk: flutter flutter_swipe_action_cell: ^3.1.2 - tencent_cloud_chat: ^1.2.1 - tencent_cloud_chat_common: ^1.2.1 +# tencent_cloud_chat: ^1.2.1 +# tencent_cloud_chat_common: ^1.2.1 + wb_flutter_tool: + git: + url: http://jarvis:apple123@192.168.4.209:8081/ios/wb_flutter_tool.git dependency_overrides: tencent_cloud_chat_intl: diff --git a/tencent_cloud_chat_group_profile/pubspec.yaml b/tencent_cloud_chat_group_profile/pubspec.yaml index c8147507..62cecde5 100644 --- a/tencent_cloud_chat_group_profile/pubspec.yaml +++ b/tencent_cloud_chat_group_profile/pubspec.yaml @@ -11,8 +11,8 @@ environment: dependencies: flutter: sdk: flutter - tencent_cloud_chat: ^1.2.1 - tencent_cloud_chat_common: ^1.2.1 +# tencent_cloud_chat: ^1.2.1 +# tencent_cloud_chat_common: ^1.2.1 azlistview_all_platforms: ^2.1.2 dependency_overrides: diff --git a/tencent_cloud_chat_message/lib/data/tencent_cloud_chat_message_separate_data.dart b/tencent_cloud_chat_message/lib/data/tencent_cloud_chat_message_separate_data.dart index 52881a28..8e2cf7cc 100644 --- a/tencent_cloud_chat_message/lib/data/tencent_cloud_chat_message_separate_data.dart +++ b/tencent_cloud_chat_message/lib/data/tencent_cloud_chat_message_separate_data.dart @@ -5,6 +5,7 @@ import 'dart:io'; import 'package:fc_native_video_thumbnail/fc_native_video_thumbnail.dart'; import 'package:flutter/scheduler.dart'; +import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart'; import 'package:scroll_to_index/scroll_to_index.dart'; import 'package:tencent_cloud_chat/chat_sdk/components/tencent_cloud_chat_conversation_sdk.dart'; @@ -20,6 +21,7 @@ import 'package:tencent_cloud_chat_message/data/tencent_cloud_chat_message_data_ import 'package:tencent_cloud_chat_message/tencent_cloud_chat_message_controller.dart'; import 'package:tencent_cloud_chat_message/tencent_cloud_chat_message_sticker/default_sticker_set.dart'; import 'package:tencent_cloud_chat_message/tencent_cloud_chat_message_sticker/tencent_cloud_chat_message_sticker_data.dart'; +import 'package:wb_flutter_tool/wb_flutter_tool.dart'; // import 'package:tencent_cloud_chat_sdk/tencent_im_sdk_plugin.dart'; class TencentCloudChatMessageSeparateDataProvider extends ChangeNotifier { @@ -695,9 +697,12 @@ class TencentCloudChatMessageSeparateDataProvider extends ChangeNotifier { if (text.isEmpty) { return null; } + var dic = "{\"original\":\"${text.trim()}\"}"; + final entext = AESTools.encryptString(dic); + print("encrypt str :${entext}"); final textMessageInfo = await TencentCloudChatMessageSDK().createTextMessage( - text: text, + text: entext, mentionedUsers: mentionedUsers, ); return _sendMessage(messageInfoResult: textMessageInfo); @@ -708,6 +713,7 @@ class TencentCloudChatMessageSeparateDataProvider extends ChangeNotifier { if (imagePath.isEmpty) { return null; } + final messageInfo = await TencentCloudChatMessageSDK().createImageMessage( imagePath: imagePath, imageName: Pertypath().basename(imagePath), @@ -721,24 +727,29 @@ class TencentCloudChatMessageSeparateDataProvider extends ChangeNotifier { if (videoPath.isEmpty) { return null; } - final plugin = FcNativeVideoThumbnail(); + // final plugin = FcNativeVideoThumbnail(); + String snapshotPath = "${(await getTemporaryDirectory()).path}${Pertypath().basename(videoPath)}.jpeg"; - await plugin.getVideoThumbnail( - srcFile: videoPath, - keepAspectRatio: true, - destFile: snapshotPath, - format: 'jpeg', - width: 128, - quality: 100, - height: 128, - ); + // await plugin.getVideoThumbnail( + // srcFile: videoPath, + // keepAspectRatio: true, + // destFile: snapshotPath, + // format: 'jpeg', + // width: 128, + // quality: 100, + // height: 128, + // ); + + ByteData imageBytes = await rootBundle.load("assets/video_noraml.png"); + Uint8List bytes = imageBytes.buffer.asUint8List(); + await File(snapshotPath).writeAsBytes(bytes); final String fileExtension = Pertypath().extension(videoPath).toLowerCase(); final messageInfo = await TencentCloudChatMessageSDK().createVideoMessage( videoFilePath: videoPath, snapshotPath: snapshotPath, type: fileExtension, - duration: 150, + duration: 1, ); return _sendMessage(messageInfoResult: messageInfo); diff --git a/tencent_cloud_chat_message/lib/tencent_cloud_chat_message_input/tencent_cloud_chat_message_input_container.dart b/tencent_cloud_chat_message/lib/tencent_cloud_chat_message_input/tencent_cloud_chat_message_input_container.dart index f90ee4bf..49198fe1 100644 --- a/tencent_cloud_chat_message/lib/tencent_cloud_chat_message_input/tencent_cloud_chat_message_input_container.dart +++ b/tencent_cloud_chat_message/lib/tencent_cloud_chat_message_input/tencent_cloud_chat_message_input_container.dart @@ -17,7 +17,7 @@ import 'package:tencent_cloud_chat_common/widgets/modal/bottom_modal.dart'; import 'package:tencent_cloud_chat_message/data/tencent_cloud_chat_message_separate_data.dart'; import 'package:tencent_cloud_chat_message/data/tencent_cloud_chat_message_separate_data_notifier.dart'; import 'package:tencent_cloud_chat_message/tencent_cloud_chat_message_builders.dart'; - +import '../tencent_cloud_chat_message_widgets/message_type_builders/wb_ext_file_path.dart'; class TencentCloudChatMessageInputContainer extends StatefulWidget { final String? userID; final String? groupID; @@ -59,9 +59,9 @@ class _TencentCloudChatMessageInputContainerState extends TencentCloudChatState< final config = dataProvider.config; if (!TencentCloudChatPlatformAdapter().isMobile) { final defaultOptions = [ - TencentCloudChatMessageGeneralOptionItem(icon: Icons.insert_drive_file_outlined, label: tL10n.file, onTap: _sendFileFromExplorer), - TencentCloudChatMessageGeneralOptionItem(icon: Icons.image_outlined, label: tL10n.image, onTap: _sendImage), - TencentCloudChatMessageGeneralOptionItem(icon: Icons.perm_media_outlined, label: tL10n.media, onTap: _sendMediaFromGallery), + // TencentCloudChatMessageGeneralOptionItem(icon: Icons.insert_drive_file_outlined, label: tL10n.file, onTap: _sendFileFromExplorer), + TencentCloudChatMessageGeneralOptionItem(icon: Icons.image_outlined, label: tL10n.image, onTap: _sendSingleImage), + TencentCloudChatMessageGeneralOptionItem(icon: Icons.video_collection, label: tL10n.video, onTap: _sendSingleVideo), ]; final additionalAttachmentOptionsForDesktop = config.additionalInputControlBarOptionsForDesktop( userID: dataProvider.userID, @@ -126,6 +126,40 @@ class _TencentCloudChatMessageInputContainerState extends TencentCloudChatState< } } } + void _sendSingleImage({Offset? offset}) async { + final ImagePicker picker = ImagePicker(); + XFile? file = await picker.pickImage(source: ImageSource.gallery); + if (file != null) { + final String fileExtension = file.path.split('.').last.toLowerCase(); + if (['jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff', 'webp'].contains(fileExtension)) { + var compressStr = await Wbfileext.compressImage(file.path!, 0.6); + if (compressStr == null || compressStr == "") { + return; + } + var sendPath = await compressStr.encrypyPath(fileExtension); + _sendFileMessage(filePath: sendPath); + } else if (['mp4', 'mov', 'avi', 'mkv', 'flv', 'wmv', 'mpeg', 'webm', '3gp'].contains(fileExtension)) { + _sendVideoMessage(videoPath: file.path); + } else { + // Unsupported file type + debugPrint('Unsupported file type: $fileExtension'); + } + } + + } + void _sendSingleVideo({Offset? offset}) async { + FilePickerResult? result = await FilePicker.platform.pickFiles(type: FileType.video); + if (result != null && result.files.isNotEmpty) { + File file = File(result.files.single.path!); + + if (['mp4', 'mov', 'avi', 'mkv', 'flv', 'wmv', 'mpeg', 'webm', '3gp',"MP4"].contains(result.files.single.extension)) { + var encPath = await file.path.encryptVideo(result.files.single.name); + _sendVideoMessage(videoPath: encPath); + }else { + debugPrint('Unsupported video type: ${result.files.single.name}'); + } + } + } void _sendImage({Offset? offset}) async { final ImagePicker picker = ImagePicker(); diff --git a/tencent_cloud_chat_message/lib/tencent_cloud_chat_message_viewer/tencent_cloud_chat_message_videoplayer.dart b/tencent_cloud_chat_message/lib/tencent_cloud_chat_message_viewer/tencent_cloud_chat_message_videoplayer.dart index cfd5dc42..142a8b01 100644 --- a/tencent_cloud_chat_message/lib/tencent_cloud_chat_message_viewer/tencent_cloud_chat_message_videoplayer.dart +++ b/tencent_cloud_chat_message/lib/tencent_cloud_chat_message_viewer/tencent_cloud_chat_message_videoplayer.dart @@ -113,14 +113,14 @@ class TencentCloudChatMessageVideoPlayerState @override Widget build(BuildContext context) { - if (widget.message.hasRiskContent == true) { - return const Center( - child: Text( - "视频存在风险", - style: TextStyle(color: Colors.white), - ), - ); - } + // if (widget.message.hasRiskContent == true) { + // return const Center( + // child: Text( + // "视频存在风险", + // style: TextStyle(color: Colors.white), + // ), + // ); + // } return FutureBuilder( future: getMessageInfo(), builder: diff --git a/tencent_cloud_chat_message/lib/tencent_cloud_chat_message_widgets/message_type_builders/tencent_cloud_chat_message_file.dart b/tencent_cloud_chat_message/lib/tencent_cloud_chat_message_widgets/message_type_builders/tencent_cloud_chat_message_file.dart index efd1921f..ec449741 100644 --- a/tencent_cloud_chat_message/lib/tencent_cloud_chat_message_widgets/message_type_builders/tencent_cloud_chat_message_file.dart +++ b/tencent_cloud_chat_message/lib/tencent_cloud_chat_message_widgets/message_type_builders/tencent_cloud_chat_message_file.dart @@ -2,6 +2,7 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; import 'dart:math'; +import 'dart:typed_data'; import 'package:flutter/material.dart'; import 'package:open_file/open_file.dart'; @@ -13,8 +14,11 @@ import 'package:tencent_cloud_chat/tencent_cloud_chat.dart'; import 'package:tencent_cloud_chat/utils/tencent_cloud_chat_utils.dart'; import 'package:tencent_cloud_chat_common/base/tencent_cloud_chat_theme_widget.dart'; import 'package:tencent_cloud_chat_common/widgets/file_icon/tencent_cloud_chat_file_icon.dart'; +import 'package:tencent_cloud_chat_message/tencent_cloud_chat_message_widgets/message_type_builders/wb_ext_file_path.dart'; import 'package:tencent_cloud_chat_message/tencent_cloud_chat_message_widgets/tencent_cloud_chat_message_item.dart'; - +import 'package:flutter_cache_manager/flutter_cache_manager.dart'; +import 'package:wb_flutter_tool/wb_flutter_tool.dart'; +import 'wb_ext_file_path.dart'; enum TimFileCurrentRenderType { online, local, @@ -69,6 +73,8 @@ class _TencentCloudChatMessageFileState extends TencentCloudChatMessageState decryptPath({ String fileName = "", bool isImg = true}) async { + String? fileFormat; + var hasFormat = false; + List imgFormats = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff', 'webp']; + if (!isImg) { + imgFormats = ['mp4', 'mov', 'avi', 'mkv', 'flv', 'wmv', 'mpeg', 'webm', '3gp',"MP4"]; + } + for (String form in imgFormats) { + if (this.contains(form)) { + hasFormat = true; + } + } + if (hasFormat) { + fileFormat = this.split(".")[max(this + .split(".") + .length - 1, 0)]; + } else { + fileFormat = isImg ? ".jpg":".mp4"; + } + var str = "/"; + if (PlatformUtils().isWindows) { + str = "\\"; + } + + String lastdierName = this.split(str)[max(this + .split(str) + .length - 1, 0)]; + String saveDirec = this.replaceAll(lastdierName, ""); + + String saveNewName = lastdierName.replaceAll( + ".${fileFormat}", "_decrypt.${fileFormat}"); + if (!hasFormat) { + saveNewName = lastdierName + fileFormat!; + } + + if (!File("${saveDirec}/${saveNewName}").existsSync()) { + var aescode = Uint8List.fromList(aesKey.codeUnits); + var file = File(this).readAsBytesSync(); + var imgfile = file.sublist(aescode.length, file.length); + print("file path:${this},file name:${fileName}"); + await File("${saveDirec}/${saveNewName}") + ..createSync(recursive: true) + ..writeAsBytesSync(imgfile); + } + + return Future.value("${saveDirec}/${saveNewName}"); + } + + String splitAllExJson() { + return this.trim().replaceAll('\n', '').replaceAll("\r", "").replaceAll("\r\n", ""); + } + + static Future compressImage(String imagePath, double scale) { + // 替换为你的图像文件路径 + final File imageFile = File(imagePath); + + final img.Image? originalImage = img.decodeImage(imageFile.readAsBytesSync()); + if (originalImage == null) { + print('无法解码图像文件'); + return Future(() => null); + } + + final img.Image compressedImage = img.copyResize(originalImage, width: originalImage!.width, + height: originalImage!.height + ); // 调整图像尺寸 + final String compressedImagePath = path.join(path.dirname(imagePath), + '${path.basenameWithoutExtension(imagePath)}_compressed_image.jpg'); + if (!File(compressedImagePath).existsSync()) { + File(compressedImagePath).writeAsBytesSync(img.encodeJpg(compressedImage, quality: 60)); // 压缩质量(0-100) + } + // 压缩后的图像文件 + print('压缩后的图像文件路径:$compressedImagePath'); + return Future(() => compressedImagePath); + } + Future encryptVideo(String fileFormat) async { + File file = File(this!); + final int size = file.lengthSync(); + final String savePath = file.path; + var fileFormat = savePath.split(".")[max(savePath.split(".").length - 1, 0)]; + var encryptPath = savePath.replaceAll(".${fileFormat}", "_encrypt.${fileFormat}"); + var aescode = Uint8List.fromList( aesKey.codeUnits); + if (!File(encryptPath).existsSync()) { + var filedata = file.readAsBytesSync(); + var imgFile = Uint8List.fromList(aescode + filedata); + print("video file data: ${imgFile}"); + + int fileSize = imgFile.lengthInBytes; + File(encryptPath)..createSync(recursive: true)..writeAsBytesSync(imgFile); + } + print("video file path:${encryptPath},file name:${this}"); + + + + return Future.value(encryptPath); + } + Future encrypyPath(String fileFormat) async{ + var path = await compressImage(this, 0.6); + if (path == null) { + print("压缩失败"); + return Future.value(""); + } + File file = File(path!); + final int size = file.lengthSync(); + final String savePath = file.path; + var aescode = Uint8List.fromList( aesKey.codeUnits); + var filedata = file.readAsBytesSync(); + var imgFile = Uint8List.fromList(aescode + filedata); + print("file data: ${imgFile}"); + var fileFormat = savePath.split(".")[max(savePath.split(".").length - 1, 0)]; + var encryptPath = savePath.replaceAll(".${fileFormat}", "_encrypt.${fileFormat}"); + print("file path:${encryptPath},file name:${this}"); + int fileSize = imgFile.lengthInBytes; + if (!File(encryptPath).existsSync()) { + File(encryptPath)..createSync(recursive: true)..writeAsBytesSync(imgFile); + } + return Future.value(encryptPath); + + + } +} \ No newline at end of file diff --git a/tencent_cloud_chat_message/pubspec.yaml b/tencent_cloud_chat_message/pubspec.yaml index 9d8e1623..d877f783 100644 --- a/tencent_cloud_chat_message/pubspec.yaml +++ b/tencent_cloud_chat_message/pubspec.yaml @@ -17,8 +17,8 @@ dependencies: file_picker: ^6.1.1 pull_to_refresh: ^2.0.0 flutter_list_view: ^1.1.18 - tencent_cloud_chat: ^1.2.1 - tencent_cloud_chat_common: ^1.2.1 +# tencent_cloud_chat: ^1.2.1 +# tencent_cloud_chat_common: ^1.2.1 http: ^1.1.0 card_swiper: ^3.0.1 photo_view: ^0.14.0 @@ -32,6 +32,12 @@ dependencies: desktop_drop: ^0.4.4 dotted_border: ^2.1.0 package_info_plus: ^5.0.1 + cached_network_image: ^3.3.1 + image: ^4.1.7 + path: ^1.8.1 + wb_flutter_tool: + git: + url: http://jarvis:apple123@192.168.4.209:8081/ios/wb_flutter_tool.git dependency_overrides: tencent_cloud_chat_intl: diff --git a/tencent_cloud_chat_search/pubspec.yaml b/tencent_cloud_chat_search/pubspec.yaml index 70401065..262b2b19 100644 --- a/tencent_cloud_chat_search/pubspec.yaml +++ b/tencent_cloud_chat_search/pubspec.yaml @@ -12,14 +12,21 @@ environment: dependencies: flutter: sdk: flutter - tencent_cloud_chat: ^1.2.0 - tencent_cloud_chat_common: ^1.2.0 +# tencent_cloud_chat: ^1.2.0 +# tencent_cloud_chat_common: ^1.2.0 + +dependency_overrides: + tencent_cloud_chat: + path: ../tencent_cloud_chat + tencent_cloud_chat_common: + path: ../tencent_cloud_chat_common dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^2.0.0 + # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/tencent_cloud_chat_user_profile/pubspec.yaml b/tencent_cloud_chat_user_profile/pubspec.yaml index b60b217e..52f68752 100644 --- a/tencent_cloud_chat_user_profile/pubspec.yaml +++ b/tencent_cloud_chat_user_profile/pubspec.yaml @@ -11,8 +11,8 @@ environment: dependencies: flutter: sdk: flutter - tencent_cloud_chat: ^1.2.1 - tencent_cloud_chat_common: ^1.2.1 +# tencent_cloud_chat: ^1.2.1 +# tencent_cloud_chat_common: ^1.2.1 dependency_overrides: tencent_cloud_chat_intl: