Resources ship with your app
Workers, WASM, fonts and rendering assets are bundled. Preview locally without a public CDN or remote conversion.
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

Flutter SDK
Add FileViewerHost at the app root and FileViewer on your page. The SDK handles local resources, platform views and the session lifecycle.
flutter pub add file_viewer_flutter:0.1.0-dev.2Apply host setup from your app directory, then rebuild. Web needs no native setup.
Declare the asset and give the viewer a bounded layout.
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'),
),
),
),
));
}dependencies:
flutter:
sdk: flutter
file_viewer_flutter: 0.1.0-dev.2
flutter:
assets:
- assets/report.pdfdart run file_viewer_flutter:setup --project . --applyRuntime
No third-party conversion service. Reuse the viewer across routes instead of starting it from scratch each time.
Warm-up and lifecycleWorkers, WASM, fonts and rendering assets are bundled. Preview locally without a public CDN or remote conversion.
FileViewerHost starts application-scoped warm-up. Use preload() to parse a known upcoming document in advance.
Keep one idle session and release it under memory pressure. Recreate the viewer after the OS reclaims the process.
Platforms
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
Start with your first document.