universal_file_previewer library

Universal File Previewer Preview 50+ file formats with zero heavy dependencies.

Classes

FileDetector
Detects file type using magic bytes (file signatures) and extension fallback. Never trust extensions alone — always read the actual bytes.
FilePreviewerChannel
Communicates with native platform code (Android/iOS) for operations that require system APIs: PDF rendering, video thumbnails, etc.
FilePreviewPage
A full-screen page that wraps FilePreviewWidget with an AppBar, file name, and optional share/info actions.
FilePreviewWidget
The main widget for previewing any file.
PreviewConfig
Configuration for the file previewer appearance and behavior.
PreviewController
Controller to programmatically control the file preview.

Enums

CodeTheme
Code syntax highlighting theme
FileType
All supported file types

Exceptions / Errors

FilePreviewerException
Exception thrown by platform channel operations.