diff --git a/lib/utils/fluffy_share.dart b/lib/utils/fluffy_share.dart index 3ecfcbf2a..b699175b9 100644 --- a/lib/utils/fluffy_share.dart +++ b/lib/utils/fluffy_share.dart @@ -15,9 +15,11 @@ abstract class FluffyShare { }) async { if (PlatformInfos.isMobile && !copyOnly) { final box = context.findRenderObject() as RenderBox; - await Share.share( - text, - sharePositionOrigin: box.localToGlobal(Offset.zero) & box.size, + await SharePlus.instance.share( + ShareParams( + text: text, + sharePositionOrigin: box.localToGlobal(Offset.zero) & box.size, + ), ); return; } diff --git a/lib/utils/matrix_sdk_extensions/matrix_file_extension.dart b/lib/utils/matrix_sdk_extensions/matrix_file_extension.dart index 01b2d85e4..069b6ec8b 100644 --- a/lib/utils/matrix_sdk_extensions/matrix_file_extension.dart +++ b/lib/utils/matrix_sdk_extensions/matrix_file_extension.dart @@ -76,10 +76,12 @@ extension MatrixFileExtension on MatrixFile { // https://github.com/fluttercommunity/plus_plugins/tree/main/packages/share_plus/share_plus#ipad final box = context.findRenderObject() as RenderBox?; - await Share.shareXFiles( - [XFile.fromData(bytes, name: name, mimeType: mimeType)], - sharePositionOrigin: - box == null ? null : box.localToGlobal(Offset.zero) & box.size, + await SharePlus.instance.share( + ShareParams( + files: [XFile.fromData(bytes, name: name, mimeType: mimeType)], + sharePositionOrigin: + box == null ? null : box.localToGlobal(Offset.zero) & box.size, + ), ); return; } diff --git a/pubspec.lock b/pubspec.lock index f16f6b56d..44fcae737 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1672,18 +1672,18 @@ packages: dependency: "direct main" description: name: share_plus - sha256: fce43200aa03ea87b91ce4c3ac79f0cecd52e2a7a56c7a4185023c271fbfa6da + sha256: b2961506569e28948d75ec346c28775bb111986bb69dc6a20754a457e3d97fa0 url: "https://pub.dev" source: hosted - version: "10.1.4" + version: "11.0.0" share_plus_platform_interface: dependency: transitive description: name: share_plus_platform_interface - sha256: cc012a23fc2d479854e6c80150696c4a5f5bb62cb89af4de1c505cf78d0a5d0b + sha256: "1032d392bc5d2095a77447a805aa3f804d2ae6a4d5eef5e6ebb3bd94c1bc19ef" url: "https://pub.dev" source: hosted - version: "5.0.2" + version: "6.0.0" shared_preferences: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 1b5ab7c1c..781c701d1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -73,7 +73,7 @@ dependencies: receive_sharing_intent: ^1.8.1 record: ^6.0.0 scroll_to_index: ^3.0.1 - share_plus: ^10.0.2 + share_plus: ^11.0.0 shared_preferences: ^2.2.0 # Pinned because https://github.com/flutter/flutter/issues/118401 slugify: ^2.0.0 sqflite_common_ffi: ^2.3.6