Skip to content
pubscout

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.

$ flutter pub add universal_file_viewer
Source repository

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.

Works with

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