How To Share A File Using Flutter
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.
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.
- → populate backend create form
- → Can I customize the code formatting of Dart code in Atom?
- → Is it possible to develop iOS apps with Flutter on a Linux virtual machine?
- → Display SnackBar in Flutter
- → JSON ObjectMapper in Flutter
- → Material flutter app source code
- → TabBarSelection No such method error
- → Add different routes/screens to Flutter app
- → How to share a file using flutter
- → Is there an easy way to find particular text built from RichText in a Flutter test?
- → Bug report: Issue building flutter on a mac
- → How do you use a TextPainter to draw text?
- → Preloading local image assets in Flutter