How to share a file using flutter

前端 未结 7 1290
悲哀的现实
悲哀的现实 2021-02-07 09:43

I am wondering how to share a file in a flutter app?

I saw some old references to using Intents with mojo, but that no longer seems to be present. This seems like a sta

7条回答
  •  抹茶落季
    2021-02-07 10:27

    Flutter just accepted a long time PR, the Share plugin can now also share files!

    ex:

    Share.shareFiles(['${directory.path}/image.jpg'], text: 'Great picture');
    Share.shareFiles(['${directory.path}/image1.jpg', '${directory.path}/image2.jpg']);
    

提交回复
热议问题