File Viewer Flutter
中文
0.1.0-dev.2/Development preview

File Viewer.
Now in Flutter.

PDF, Word, Excel and PowerPoint previews through one Dart API. Bundled offline resources, application warm-up and reusable sessions.

Flutter 3.47+ · Dart 3.13+ · Apache-2.0

File ViewerOpen demo
A rendered Word document
Real shared-engine previews. See the docs for Flutter setup and device scope.
One API. Six platform targets.

Install. Configure.
Open a document.

Add FileViewerHost at the app root and FileViewer on your page. The SDK handles local resources, platform views and the session lifecycle.

  1. 01
    Install the packageflutter pub add file_viewer_flutter:0.1.0-dev.2
  2. 02
    Configure the native host

    Apply host setup from your app directory, then rebuild. Web needs no native setup.

  3. 03
    Declare and display a document

    Declare the asset and give the viewer a bounded layout.

Read the quick start
main.dart
import 'package:flutter/material.dart';
import 'package:file_viewer_flutter/file_viewer_flutter.dart';

void main() {
  runApp(const FileViewerHost(
    child: MaterialApp(
      home: Scaffold(
        body: FileViewer(
          source: FileViewerSource.asset('assets/report.pdf'),
        ),
      ),
    ),
  ));
}
Native host setup
Terminal
dart run file_viewer_flutter:setup --project . --apply

Warm-up, offline
and session reuse

No third-party conversion service. Reuse the viewer across routes instead of starting it from scratch each time.

Warm-up and lifecycle
01

Resources ship with your app

Workers, WASM, fonts and rendering assets are bundled. Preview locally without a public CDN or remote conversion.

02

Prepare after the first frame

FileViewerHost starts application-scoped warm-up. Use preload() to parse a known upcoming document in advance.

03

Reuse sessions across routes

Keep one idle session and release it under memory pressure. Recreate the viewer after the OS reclaims the process.

Platforms and validation

This is a development preview. These are recorded validation targets; test your production devices and documents.

The four asset packages total approximately 225 MiB before app compression. Windows / Linux also bundle native browser engines. Offline delivery and licenses

File Viewer for Flutter

Start with your first document.

Read the documentation

Search documentation

Type a query to search the integration guides.

↑ ↓ navigate ↵ open