universal_file_viewer
0.1.7, released 2 months ago by shouryasonu.me
Preview local and remote files with inline viewers and external app fallbacks in Flutter.
What it does
Provides a Flutter widget to preview common file types including images, videos, PDFs, spreadsheets, and text documents. It supports both local files and remote URLs, automatically downloading remote files and falling back to external apps for unsupported formats.
AI-written summary of version 0.1.7, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to display inline previews of documents or media within your Flutter app.
- You want to handle both local file paths and remote URLs using a single widget.
- You need a fallback option to open unsupported files using external applications.
Skip it when
- You require complex editing capabilities for documents or spreadsheets.
- You need inline preview for PowerPoint files (which currently only support external app fallback).
Strengths
- Supports multiple file types like images, videos, PDFs, Word, spreadsheets, and markdown.
- Handles remote URLs by downloading files to temporary storage automatically.
- Includes external app fallback for unsupported formats.
Weaknesses
- PowerPoint files currently lack inline preview and rely on external fallbacks.
- Legacy `.doc` files are not supported inline and fall back to external apps.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 10
not documented
UniversalFileViewer(
file: File('/path/to/sample.pdf'),
)Alternatives
Packages that do the same job and could replace universal_file_viewer.
- native_file_preview
A Flutter plugin providing native file preview capabilities for iOS and Android.
74Compare - file_selector_macos
macOS implementation of the file_selector plugin
82Compare - flutter_downloader
Plugin to create and manage background download tasks on Android and iOS.
80Compare - path_provider_android
Android implementation of the path_provider plugin for finding commonly used locations.
79Compare
Works with
Packages commonly used together with universal_file_viewer: ones it builds on, ones built on it, and its own family.
- archiveuniversal_file_viewer depends on itEncodes and decodes archive and compression formats such as zip, tar, gzip, and zlib.
- xmluniversal_file_viewer depends on itFull-featured XML and XPath library for DOM parsing, SAX streaming, and fluent building.
- path_provideruniversal_file_viewer depends on itProvides Flutter APIs to locate common filesystem directories on Android, iOS, macOS, Linux and Windows.
- video_playeruniversal_file_viewer depends on itFlutter plugin for displaying inline video on Android, iOS, macOS, and web.
- flutter_markdown_plusuniversal_file_viewer depends on itA Markdown renderer widget for Flutter to display rich text from plain text data.
- pdfrxuniversal_file_viewer depends on itFast, cross‑platform PDF viewer and editor widget for Flutter apps.
- open_fileuniversal_file_viewer depends on itPlugin to open local files with native apps across Android, iOS, web, desktop
- excel_communityuniversal_file_viewer depends on itCommunity fork of the excel library to read, create, and edit XLSX and XLS files.