upgraded pub things

This commit is contained in:
Kima
2024-06-20 12:06:50 +02:00
parent fd1b15df77
commit bc8eb1910e
5 changed files with 161 additions and 91 deletions

View File

@@ -6,10 +6,9 @@ import 'package:share_plus/share_plus.dart';
class ShareHelper {
static Future<void> shareText(String text, {String? subject}) =>
Share.share(text, subject: subject);
// ignore: deprecated_member_use
static Future<void> shareFile(String path, {String? text, String? subject}) =>
// ignore: deprecated_member_use
Share.shareFiles([path], text: text, subject: subject);
Share.shareXFiles([XFile(path)], text: text, subject: subject);
static Future<void> shareAttachment(Attachment attachment,
{required BuildContext context}) async {