Explorar el Código

Add a util function to share text

Vishnu Mohandas hace 4 años
padre
commit
ad8bca7fe7
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  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");
 }
 
+Future<void> shareText(String text) async {
+  return ShareExtend.share(text, "text");
+}
+
 Future<void> _shareImage(ProgressDialog dialog, File file) async {
   await dialog.show();
   final bytes = await getBytes(file);