Issue
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 standard feature that we should be able to handle in a cross-platform way (obviously with some differences between ios to android).
What is the current best practices for sharing files (e.g. via email)? The closest thing I could fine is UrlLauncher, which I could imagine using to launch a handler for a file that I want shared, but it seems a stretch.
Solution
For anybody still finding this question, you can now share something with the share plugin: https://pub.dartlang.org/packages/share
Edit: This plugin only supports text/link share which is not sufficient for directly sharing files. The issues https://github.com/flutter/flutter/issues/16743 and https://github.com/flutter/flutter/issues/19607 track file sharing directly in flutter.
Answered By - areiser
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.