diff --git a/mobile/lib/shared/services/share.service.dart b/mobile/lib/shared/services/share.service.dart index c0e61c9d9..ebf1d9f0f 100644 --- a/mobile/lib/shared/services/share.service.dart +++ b/mobile/lib/shared/services/share.service.dart @@ -22,7 +22,7 @@ class ShareService { } Future shareAssets(List assets) async { - final downloadedFilePaths = assets.map((asset) async { + final downloadedXFiles = assets.map>((asset) async { if (asset.isRemote) { final tempDir = await getTemporaryDirectory(); final fileName = basename(asset.remote!.originalPath); @@ -33,16 +33,16 @@ class ShareService { isWeb: false, ); tempFile.writeAsBytesSync(res.bodyBytes); - return tempFile.path; + return XFile(tempFile.path); } else { File? f = await asset.local!.file; - return f!.path; + return XFile(f!.path); } }); // ignore: deprecated_member_use - Share.shareFiles( - await Future.wait(downloadedFilePaths), + Share.shareXFiles( + await Future.wait(downloadedXFiles), sharePositionOrigin: Rect.zero, ); } diff --git a/mobile/pubspec.lock b/mobile/pubspec.lock index 4aa83e798..6ec5b7b3d 100644 --- a/mobile/pubspec.lock +++ b/mobile/pubspec.lock @@ -210,7 +210,7 @@ packages: name: cross_file url: "https://pub.dartlang.org" source: hosted - version: "0.3.3+1" + version: "0.3.3+2" crypto: dependency: transitive description: @@ -868,42 +868,14 @@ packages: name: share_plus url: "https://pub.dartlang.org" source: hosted - version: "4.0.10" - share_plus_linux: - dependency: transitive - description: - name: share_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - share_plus_macos: - dependency: transitive - description: - name: share_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" + version: "6.3.0" share_plus_platform_interface: dependency: transitive description: name: share_plus_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "3.0.3" - share_plus_web: - dependency: transitive - description: - name: share_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - share_plus_windows: - dependency: transitive - description: - name: share_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" + version: "3.2.0" shared_preferences: dependency: transitive description: @@ -1174,14 +1146,14 @@ packages: name: url_launcher_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.1.1" url_launcher_web: dependency: transitive description: name: url_launcher_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.11" + version: "2.0.14" url_launcher_windows: dependency: transitive description: @@ -1279,7 +1251,7 @@ packages: name: wakelock_windows url: "https://pub.dartlang.org" source: hosted - version: "0.2.0" + version: "0.2.1" watcher: dependency: transitive description: @@ -1307,7 +1279,7 @@ packages: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "2.7.0" + version: "3.1.3" wkt_parser: dependency: transitive description: diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml index 0b6fdc825..4dec20d1d 100644 --- a/mobile/pubspec.yaml +++ b/mobile/pubspec.yaml @@ -32,7 +32,7 @@ dependencies: http: 0.13.4 cancellation_token_http: ^1.1.0 easy_localization: ^3.0.1 - share_plus: ^4.0.10 + share_plus: ^6.3.0 flutter_displaymode: ^0.4.0 scrollable_positioned_list: ^0.3.4 path: ^1.8.1