Skip to content
pubscout

better_open_file

3.6.5, released 3 years ago by an unverified publisher

Call native applications to open files with string results across platforms.

$ flutter pub add better_open_file
Source repository

What it does

Allows your Flutter application to trigger native apps to open specific files using platform-specific mechanisms like intents on Android, DocumentInteraction on iOS, ffi on PC, and dart:html on the web. It returns the result as a string.

AI-written summary of version 3.6.5, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to let users open downloaded files or documents inside native applications.
  • You need cross-platform file opening support covering Android, iOS, PC, and web.

Skip it when

  • You need to parse or view files directly inside the Flutter UI rather than launching an external app.

Strengths

  • Supports multiple platforms including mobile, desktop, and web.
  • Handles automatic type and UTI retrieval for common file formats.

Weaknesses

  • May require manual Android FileProvider configuration adjustments if conflicts occur with other plugins.
  • Relies entirely on external native applications installed on the device to view files.

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
1

May require configuring Android FileProvider XML paths in AndroidManifest.xml if conflicts with other plugins occur.

import 'package:better_open_file/better_open_file.dart';

OpenFile.open("/sdcard/example.txt");

Alternatives

Packages that do the same job and could replace better_open_file.

Works with

Packages commonly used together with better_open_file: ones it builds on, ones built on it, and its own family.