ソースを参照

Add a util function to share text

Vishnu Mohandas 4 年 前
コミット
ad8bca7fe7
1 ファイル変更4 行追加0 行削除
  1. 4 0
      lib/utils/share_util.dart

+ 4 - 0
lib/utils/share_util.dart

@@ -38,6 +38,10 @@ Future<void> _shareVideo(ProgressDialog dialog, File file) async {
   return ShareExtend.share(path, "image");
   return ShareExtend.share(path, "image");
 }
 }
 
 
+Future<void> shareText(String text) async {
+  return ShareExtend.share(text, "text");
+}
+
 Future<void> _shareImage(ProgressDialog dialog, File file) async {
 Future<void> _shareImage(ProgressDialog dialog, File file) async {
   await dialog.show();
   await dialog.show();
   final bytes = await getBytes(file);
   final bytes = await getBytes(file);