Package selection guidance compiled from public package information, community data, and project usage.
The open_file package enables Flutter applications to launch native apps for opening files using platform-specific mechanisms. On Android, it uses Intents; on iOS, it leverages UTIs; on desktop platforms (macOS, Windows, Linux), it employs FFI; and on the web, it uses dart:html. It returns a string result indicating success or failure, making it ideal for handling file types like PDFs, images, and documents across platforms with minimal boilerplate.
Use cases
Opening PDFs and documents
Launching external apps for file viewing
Supporting file sharing workflows
Cross-platform file handling
Integrating with file picker plugins
Enabling document preview in apps
Key features
Cross-platform file opening
Native integration via platform channels
String-based result feedback
Support for iOS UTI and Android Intent
Desktop support via FFI
Web compatibility with dart:html
Suitable for
Apps needing file previews
Document management tools
File picker integrations
Multi-platform apps
Developers targeting iOS, Android, Web, and desktop
Considerations
Requires proper file path handling
Limited to supported file types by OS
May need additional permissions on some platforms
Result handling depends on platform behavior
Not suitable for file creation or editing
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
open_file
A plug-in that can call native APP to open files with string result in flutter, support iOS(DocumentInteraction) / android(intent) / PC(ffi) / web(dart:html)
Usage
To use this plugin, add open_file as a dependency in your pubspec.yaml file.
If you want to open an external file, You need to request permission start in 3.3.0, This is an example