File Viewer / Flutter
中文
0.1.0-dev.1 / Development preview is live

FILE PREVIEWS. THE FLUTTER WAY.

File previews.
At home in your
Flutter app.

One Dart API for documents, spreadsheets, presentations and more. Bundled offline resources, with application-scoped warm-up for what comes next.

Flutter 3.47+ · Dart 3.13+ · No conversion server

FileViewerHost APP SCOPE
your_flutter_app⌘
Fproject-brief.pdfUI illustration− 100% +
FIELD NOTES01 / 06

BUILD SOMETHING THAT FITS.

The next document.
Inside your app.

Local rendering. Familiar controls. Ready to open.

FILE VIEWER × FLUTTER01
Bundled resourcesPDF · DOCX · XLSX · PPTX
FileViewer(source: document)</>
↻Leave the route. Keep the session.

A SMALL API. A COMPLETE START.

From dependency to document.

Configure the host once, then build with familiar Flutter widgets. Complete examples and platform details are in the docs.

01

Install from pub.dev

Matching assets and platform adapters arrive together.

pubspec.yaml
dependencies:
  file_viewer_flutter: 0.1.0-dev.1
02

Warm up at the app root

Prepare after the first frame. Reuse sessions across routes.

Dart
runApp(
  FileViewerHost(child: MyApp()),
);
03

Put a preview on screen

Declare your document asset and give the viewer a bounded layout.

Dart
FileViewer(
  source: FileViewerSource.asset(
    'assets/report.pdf',
  ),
)
Run host setup once on native targets and declare the example document in assets.Follow the complete quick start

YOUR DOCUMENTS. YOUR SOURCES.

Your documents.
Your choice of source.

An application asset, a device file, bytes in memory, or an authenticated endpoint. One component handles the source while paths and credentials stay in Dart.

Explore document sources

Web cannot access arbitrary native paths. Remote URLs still need a network and applicable CORS permissions.

source.dart
const source = FileViewerSource.asset(
  'assets/report.pdf',
);

FileViewer(source: source)
⌑API examples; URL and token values are placeholders.

READY BEFORE THE NEXT ROUTE.

Prepare now.
Open on the next route.

The Host warms up after the first frame. Preload when the next document is known. Keep one released session so reopening can reuse its document and view state.

Understand warm-up and lifecycle
01

FileViewerHostPrepare shell and modules after the first frame

warmUp()
02

A known upcoming documentOptionally parse ahead with matching source and options

preload()
03

Leave and returnKeep at most one idle session; release it under memory pressure

reuse

Warm-up readiness and first visible content are different. Background retention remains subject to OS suspension and reclamation.

BUILD WITH A CLEAR SCOPE.

Know the scope before you ship.

This is a development preview under active qualification. Mobile uses system WebViews, desktop delivery follows each platform, and Workers, WASM, fonts and resources ship with the app.

View platform setup and measured scope
CURRENT RELEASE0.1.0-dev.1Development preview · pub.dev
OFFLINE DELIVERY

Bundled assets; Windows / Linux engines prepared at build time.

Size, deployment and licenses

YOUR NEXT PREVIEW STARTS HERE.

A familiar place for files.
Inside your Flutter app.

Open the quick start

Search documentation

Type a query to search the integration guides.

↑ ↓ navigate ↵ open