Skip to content
pubscout

flutter_cached_pdfview

0.4.4, released 5 months ago by bnsaed.com

Display native PDF views on Android and iOS from a path, asset, or cached URL.

$ flutter pub add flutter_cached_pdfview
Source repository

What it does

Provides widgets to render native PDF views from various resources like local paths, asset bundles, or network URLs with built-in caching. Supports features such as zooming, swiping horizontally or vertically, jumping to specific pages, and password protection.

AI-written summary of version 0.4.4, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to display PDF documents directly inside your Flutter UI on Android and iOS.
  • You need to load and cache remote PDFs from URLs automatically.

Skip it when

  • You need robust web support (currently listed as 'soon' in the documentation).
  • You need advanced custom PDF rendering and manipulation logic in pure Dart rather than native platform views.

Strengths

  • Supports loading from local paths, assets, and remote URLs with caching.
  • Native rendering performance using AndroidPdfViewer and PDFKit.
  • Customizable options for page swiping, zooming, night mode, and event callbacks.

Weaknesses

  • Requires native configuration steps (like modifying Info.plist and Podfile on iOS).
  • Web support is not yet fully implemented.
  • Some options have platform-specific limitations (e.g., nightMode and pageSnap are Android-only).

Setup

Kind
Flutter widgets
Effort
Medium
Code generation
No
Direct dependencies
4

Requires adding 'io.flutter.embedded_views_preview' to Info.plist and setting platform to at least iOS 11.0 in the Podfile. For Android with Proguard, you need to keep com.shockwave classes.

PDF(
  swipeHorizontal: true,
).cachedFromUrl('https://ontheline.trincoll.edu/images/bookdown/sample-local-pdf.pdf')

Alternatives

Packages that do the same job and could replace flutter_cached_pdfview.

Works with

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