diff --git a/packages/at_backupkey_flutter/CHANGELOG.md b/packages/at_backupkey_flutter/CHANGELOG.md index 81d0a57fb..6f2b93b2c 100644 --- a/packages/at_backupkey_flutter/CHANGELOG.md +++ b/packages/at_backupkey_flutter/CHANGELOG.md @@ -1,7 +1,13 @@ +## 4.0.17 +- **FIX**: Replaced the use of file_selector with file_picker +- **CHORE**: Updated dependencies in the example app + ## 4.0.16 + - build[deps]: Upgraded dependencies for the following packages: - at_client_mobile: 3.2.19 - at_utils: 3.0.19 + ## 4.0.15 - **FIX**: Resolved Static analysis messages diff --git a/packages/at_backupkey_flutter/example/linux/flutter/generated_plugin_registrant.cc b/packages/at_backupkey_flutter/example/linux/flutter/generated_plugin_registrant.cc index 3d1b3ca9d..d34a64d83 100644 --- a/packages/at_backupkey_flutter/example/linux/flutter/generated_plugin_registrant.cc +++ b/packages/at_backupkey_flutter/example/linux/flutter/generated_plugin_registrant.cc @@ -8,7 +8,6 @@ #include #include -#include #include void fl_register_plugins(FlPluginRegistry* registry) { @@ -18,9 +17,6 @@ void fl_register_plugins(FlPluginRegistry* registry) { g_autoptr(FlPluginRegistrar) biometric_storage_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "BiometricStoragePlugin"); biometric_storage_plugin_register_with_registrar(biometric_storage_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); g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); diff --git a/packages/at_backupkey_flutter/example/linux/flutter/generated_plugins.cmake b/packages/at_backupkey_flutter/example/linux/flutter/generated_plugins.cmake index 393e05db7..7df401e7d 100644 --- a/packages/at_backupkey_flutter/example/linux/flutter/generated_plugins.cmake +++ b/packages/at_backupkey_flutter/example/linux/flutter/generated_plugins.cmake @@ -5,7 +5,6 @@ list(APPEND FLUTTER_PLUGIN_LIST at_file_saver biometric_storage - file_selector_linux url_launcher_linux ) diff --git a/packages/at_backupkey_flutter/example/macos/Podfile b/packages/at_backupkey_flutter/example/macos/Podfile index dade8dfad..049abe295 100644 --- a/packages/at_backupkey_flutter/example/macos/Podfile +++ b/packages/at_backupkey_flutter/example/macos/Podfile @@ -1,4 +1,4 @@ -platform :osx, '10.11' +platform :osx, '10.14' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/packages/at_backupkey_flutter/example/macos/Runner.xcodeproj/project.pbxproj b/packages/at_backupkey_flutter/example/macos/Runner.xcodeproj/project.pbxproj index 20b5b4edb..e756dcf4f 100644 --- a/packages/at_backupkey_flutter/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/at_backupkey_flutter/example/macos/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 54; objects = { /* Begin PBXAggregateTarget section */ @@ -203,7 +203,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 0930; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 33CC10EC2044A3C60003C045 = { @@ -278,6 +278,7 @@ }; 3399D490228B24CF009A79C7 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -404,7 +405,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -483,7 +484,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -530,7 +531,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/packages/at_backupkey_flutter/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/at_backupkey_flutter/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index f58bf75b4..824cde8c1 100644 --- a/packages/at_backupkey_flutter/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/packages/at_backupkey_flutter/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ Bool { return true diff --git a/packages/at_backupkey_flutter/example/windows/flutter/generated_plugin_registrant.cc b/packages/at_backupkey_flutter/example/windows/flutter/generated_plugin_registrant.cc index 036f08c22..edb3de30d 100644 --- a/packages/at_backupkey_flutter/example/windows/flutter/generated_plugin_registrant.cc +++ b/packages/at_backupkey_flutter/example/windows/flutter/generated_plugin_registrant.cc @@ -7,7 +7,6 @@ #include "generated_plugin_registrant.h" #include -#include #include #include #include @@ -15,8 +14,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { FileSaverPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("FileSaverPlugin")); - FileSelectorWindowsRegisterWithRegistrar( - registry->GetRegistrarForPlugin("FileSelectorWindows")); PermissionHandlerWindowsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); SharePlusWindowsPluginCApiRegisterWithRegistrar( diff --git a/packages/at_backupkey_flutter/example/windows/flutter/generated_plugins.cmake b/packages/at_backupkey_flutter/example/windows/flutter/generated_plugins.cmake index ac2736f29..9c958c20f 100644 --- a/packages/at_backupkey_flutter/example/windows/flutter/generated_plugins.cmake +++ b/packages/at_backupkey_flutter/example/windows/flutter/generated_plugins.cmake @@ -4,7 +4,6 @@ list(APPEND FLUTTER_PLUGIN_LIST at_file_saver - file_selector_windows permission_handler_windows share_plus url_launcher_windows diff --git a/packages/at_backupkey_flutter/lib/widgets/backup_key_widget.dart b/packages/at_backupkey_flutter/lib/widgets/backup_key_widget.dart index 055129f6e..7172d5cdd 100644 --- a/packages/at_backupkey_flutter/lib/widgets/backup_key_widget.dart +++ b/packages/at_backupkey_flutter/lib/widgets/backup_key_widget.dart @@ -7,7 +7,7 @@ import 'package:at_backupkey_flutter/utils/size_config.dart'; import 'package:at_backupkey_flutter/utils/strings.dart'; import 'package:at_file_saver/at_file_saver.dart'; import 'package:at_utils/at_logger.dart'; -import 'package:file_selector/file_selector.dart'; +import 'package:file_picker/file_picker.dart'; import 'package:flutter/material.dart'; import 'package:path_provider/path_provider.dart' as path_provider; import 'package:path_provider/path_provider.dart'; @@ -331,10 +331,12 @@ class BackupKeyWidget extends StatelessWidget { }); } } else { - final path = await getSaveLocation(suggestedName: '$atsign${Strings.backupKeyName}'); + final path = await FilePicker.platform.saveFile( + fileName: '$atsign${Strings.backupKeyName}', + ); if (path == null) return; final file = XFile(tempFilePath); - await file.saveTo(path.path); + await file.saveTo(path); if (context.mounted) { showSnackBar( context: context, diff --git a/packages/at_backupkey_flutter/pubspec.yaml b/packages/at_backupkey_flutter/pubspec.yaml index e2a579968..b86c4b991 100644 --- a/packages/at_backupkey_flutter/pubspec.yaml +++ b/packages/at_backupkey_flutter/pubspec.yaml @@ -21,11 +21,8 @@ dependencies: at_client_mobile: ^3.2.19 showcaseview: ^3.0.0 device_info_plus: ^10.1.1 - # desktop - dependencies - file_selector: ^1.0.1 - file_selector_macos: ^0.9.3+2 - file_selector_windows: ^0.9.3+1 - file_selector_linux: ^0.9.2+1 + file_picker: ^8.1.2 + dev_dependencies: flutter_test: diff --git a/packages/at_contacts_group_flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift b/packages/at_contacts_group_flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift index ec77aea7a..cc42b6975 100644 --- a/packages/at_contacts_group_flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/packages/at_contacts_group_flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift @@ -9,24 +9,24 @@ import at_file_saver import biometric_storage import device_info_plus import emoji_picker_flutter -import file_selector_macos import flutter_image_compress_macos import package_info_plus import path_provider_foundation import share_plus import shared_preferences_foundation import url_launcher_macos +import webview_flutter_wkwebview func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { FileSaverPlugin.register(with: registry.registrar(forPlugin: "FileSaverPlugin")) BiometricStorageMacOSPlugin.register(with: registry.registrar(forPlugin: "BiometricStorageMacOSPlugin")) DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) EmojiPickerFlutterPlugin.register(with: registry.registrar(forPlugin: "EmojiPickerFlutterPlugin")) - FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) FlutterImageCompressMacosPlugin.register(with: registry.registrar(forPlugin: "FlutterImageCompressMacosPlugin")) FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) + FLTWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "FLTWebViewFlutterPlugin")) } diff --git a/packages/at_contacts_group_flutter/example/macos/Podfile.lock b/packages/at_contacts_group_flutter/example/macos/Podfile.lock index 8cbb8cefe..745788c2d 100644 --- a/packages/at_contacts_group_flutter/example/macos/Podfile.lock +++ b/packages/at_contacts_group_flutter/example/macos/Podfile.lock @@ -7,32 +7,38 @@ PODS: - FlutterMacOS - emoji_picker_flutter (0.0.1): - FlutterMacOS - - file_selector_macos (0.0.1): + - flutter_image_compress_macos (1.0.0): - FlutterMacOS - FlutterMacOS (1.0.0) - package_info_plus (0.0.1): - FlutterMacOS - - path_provider_macos (0.0.1): + - path_provider_foundation (0.0.1): + - Flutter - FlutterMacOS - - share_plus_macos (0.0.1): + - share_plus (0.0.1): - FlutterMacOS - - shared_preferences_macos (0.0.1): + - shared_preferences_foundation (0.0.1): + - Flutter - FlutterMacOS - url_launcher_macos (0.0.1): - FlutterMacOS + - webview_flutter_wkwebview (0.0.1): + - Flutter + - FlutterMacOS DEPENDENCIES: - at_file_saver (from `Flutter/ephemeral/.symlinks/plugins/at_file_saver/macos`) - biometric_storage (from `Flutter/ephemeral/.symlinks/plugins/biometric_storage/macos`) - device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`) - emoji_picker_flutter (from `Flutter/ephemeral/.symlinks/plugins/emoji_picker_flutter/macos`) - - file_selector_macos (from `Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos`) + - flutter_image_compress_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_image_compress_macos/macos`) - FlutterMacOS (from `Flutter/ephemeral`) - package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`) - - path_provider_macos (from `Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos`) - - share_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/share_plus_macos/macos`) - - shared_preferences_macos (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_macos/macos`) + - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`) + - share_plus (from `Flutter/ephemeral/.symlinks/plugins/share_plus/macos`) + - shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`) - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) + - webview_flutter_wkwebview (from `Flutter/ephemeral/.symlinks/plugins/webview_flutter_wkwebview/darwin`) EXTERNAL SOURCES: at_file_saver: @@ -43,34 +49,37 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos emoji_picker_flutter: :path: Flutter/ephemeral/.symlinks/plugins/emoji_picker_flutter/macos - file_selector_macos: - :path: Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos + flutter_image_compress_macos: + :path: Flutter/ephemeral/.symlinks/plugins/flutter_image_compress_macos/macos FlutterMacOS: :path: Flutter/ephemeral package_info_plus: :path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos - path_provider_macos: - :path: Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos - share_plus_macos: - :path: Flutter/ephemeral/.symlinks/plugins/share_plus_macos/macos - shared_preferences_macos: - :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_macos/macos + path_provider_foundation: + :path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin + share_plus: + :path: Flutter/ephemeral/.symlinks/plugins/share_plus/macos + shared_preferences_foundation: + :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin url_launcher_macos: :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos + webview_flutter_wkwebview: + :path: Flutter/ephemeral/.symlinks/plugins/webview_flutter_wkwebview/darwin SPEC CHECKSUMS: at_file_saver: 1fc6ed722f17c7a20ce79cce168d1100fcad4b95 biometric_storage: 43caa6e7ef00e8e19c074216e7e1786dacda9e76 - device_info_plus: 5401765fde0b8d062a2f8eb65510fb17e77cf07f + device_info_plus: ce1b7762849d3ec103d0e0517299f2db7ad60720 emoji_picker_flutter: 533634326b1c5de9a181ba14b9758e6dfe967a20 - file_selector_macos: 468fb6b81fac7c0e88d71317f3eec34c3b008ff9 + flutter_image_compress_macos: c26c3c13ea0f28ae6dea4e139b3292e7729f99f1 FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 - package_info_plus: 02d7a575e80f194102bef286361c6c326e4c29ce - path_provider_macos: 3c0c3b4b0d4a76d2bf989a913c2de869c5641a19 - share_plus_macos: 853ee48e7dce06b633998ca0735d482dd671ade4 - shared_preferences_macos: a64dc611287ed6cbe28fd1297898db1336975727 - url_launcher_macos: 597e05b8e514239626bcf4a850fcf9ef5c856ec3 + package_info_plus: fa739dd842b393193c5ca93c26798dff6e3d0e0c + path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 + share_plus: 36537c04ce0c3e3f5bd297ce4318b6d5ee5fd6cf + shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 + url_launcher_macos: 5f437abeda8c85500ceb03f5c1938a8c5a705399 + webview_flutter_wkwebview: 0982481e3d9c78fd5c6f62a002fcd24fc791f1e4 PODFILE CHECKSUM: 0d3963a09fc94f580682bd88480486da345dc3f0 -COCOAPODS: 1.11.3 +COCOAPODS: 1.14.3 diff --git a/packages/at_contacts_group_flutter/example/macos/Runner.xcodeproj/project.pbxproj b/packages/at_contacts_group_flutter/example/macos/Runner.xcodeproj/project.pbxproj index 49e7b09be..1bb2981ae 100644 --- a/packages/at_contacts_group_flutter/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/at_contacts_group_flutter/example/macos/Runner.xcodeproj/project.pbxproj @@ -202,7 +202,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 33CC10EC2044A3C60003C045 = { diff --git a/packages/at_contacts_group_flutter/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/at_contacts_group_flutter/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 048feea4f..7a7ed5134 100644 --- a/packages/at_contacts_group_flutter/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/packages/at_contacts_group_flutter/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ Bool { return true diff --git a/packages/at_contacts_group_flutter/example/macos/Runner/DebugProfile.entitlements b/packages/at_contacts_group_flutter/example/macos/Runner/DebugProfile.entitlements index d138bd5b0..0eaccf141 100644 --- a/packages/at_contacts_group_flutter/example/macos/Runner/DebugProfile.entitlements +++ b/packages/at_contacts_group_flutter/example/macos/Runner/DebugProfile.entitlements @@ -6,9 +6,11 @@ com.apple.security.cs.allow-jit - com.apple.security.network.server - com.apple.security.files.user-selected.read-write + com.apple.security.network.client + + com.apple.security.network.server + diff --git a/packages/at_contacts_group_flutter/example/pubspec.yaml b/packages/at_contacts_group_flutter/example/pubspec.yaml index d6329af5e..7f9958c7f 100644 --- a/packages/at_contacts_group_flutter/example/pubspec.yaml +++ b/packages/at_contacts_group_flutter/example/pubspec.yaml @@ -40,7 +40,9 @@ dependencies: # The example app is bundled with the plugin so we use a path dependency on # the parent directory to use the current plugin's version. path: ../ + at_onboarding_flutter: ^6.1.8 at_onboarding_flutter: ^6.1.9 + # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.6 @@ -48,9 +50,6 @@ dependencies: sdk: flutter path_provider: ^2.1.3 -dependency_overrides: - file_picker: ^8.1.1 - dev_dependencies: # The "flutter_lints" package below contains a set of recommended lints to # encourage good coding practices. The lint set provided by the package is diff --git a/packages/at_contacts_group_flutter/lib/services/desktop_image_picker.dart b/packages/at_contacts_group_flutter/lib/services/desktop_image_picker.dart index 1869a0ceb..e656652d0 100644 --- a/packages/at_contacts_group_flutter/lib/services/desktop_image_picker.dart +++ b/packages/at_contacts_group_flutter/lib/services/desktop_image_picker.dart @@ -1,4 +1,5 @@ import 'dart:typed_data'; + // ignore: import_of_legacy_library_into_null_safe import 'package:at_contacts_group_flutter/services/navigation_service.dart'; import 'package:at_contacts_group_flutter/widgets/custom_toast.dart'; @@ -15,9 +16,16 @@ Future desktopImagePicker() async { extensions: ['jpg', 'png', 'jpeg'], ); final List files = await openFiles(acceptedTypeGroups: [typeGroup]); + // final files = await FilePicker.platform.pickFiles( + // type: FileType.image, + // allowedExtensions: ['jpg', 'png', 'jpeg'], + // ); if (files.isEmpty) { return null; } + // if (files == null || files.count == 0) { + // return null; + // } // ignore: omit_local_variable_types final XFile file = files[0]; @@ -29,13 +37,10 @@ Future desktopImagePicker() async { final output = compress(ImageFileConfiguration( input: input, config: const Configuration( - jpgQuality: 50, - pngCompression: PngCompression.defaultCompression, - outputType: OutputType.jpg))); + jpgQuality: 50, pngCompression: PngCompression.defaultCompression, outputType: OutputType.jpg))); if (output.sizeInBytes > 100000) { - CustomToast().show('image size cannot exceed 100 kb', - NavService.groupPckgLeftHalfNavKey.currentContext!); + CustomToast().show('image size cannot exceed 100 kb', NavService.groupPckgLeftHalfNavKey.currentContext!); return null; } diff --git a/packages/at_contacts_group_flutter/lib/services/group_service.dart b/packages/at_contacts_group_flutter/lib/services/group_service.dart index 5ca4024f3..b1bc3cd87 100644 --- a/packages/at_contacts_group_flutter/lib/services/group_service.dart +++ b/packages/at_contacts_group_flutter/lib/services/group_service.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:developer'; // ignore: import_of_legacy_library_into_null_safe import 'package:at_client_mobile/at_client_mobile.dart'; @@ -168,11 +169,19 @@ class GroupService { }) async { try { var groupIds = await atContactImpl.listGroupIds(); + // TODO: Delete log + log(groupIds.join(',').toString()); var groupList = []; for (var i = 0; i < groupIds.length; i++) { - var groupDetail = await (getGroupDetail(groupIds[i]!)); - if (groupDetail != null) groupList.add(groupDetail); + try { + var groupDetail = await (getGroupDetail(groupIds[i]!)); + // TODO : delete log + log('Details: ${groupDetail?.displayName}'); + if (groupDetail != null) groupList.add(groupDetail); + } catch (e) { + log(e.toString()); + } } for (AtGroup group in groupList) { @@ -198,6 +207,7 @@ class GroupService { atGroupSink.add(groupList); } } catch (e) { + log(e.toString()); atGroupSink.add([]); } } @@ -283,7 +293,7 @@ class GroupService { var result = await atContactImpl.deleteGroup(group); await getAllGroupsDetails(); //updating group list sink return result; - } catch (e) { + } on Exception catch (e) { atSignLogger.severe('error in deleting group: $e'); return null; } @@ -317,10 +327,7 @@ class GroupService { /// contacts list is already present, we do not fetch it again. if (allContacts.isNotEmpty) { listContact.sort((a, b) { - int? index = a.atSign - .toString() - .substring(1) - .compareTo((b.atSign).toString().substring(1)); + int? index = a.atSign.toString().substring(1).compareTo((b.atSign).toString().substring(1)); return index; });