simple_pdf_viewer 0.2.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 84

simple_pdf_viewer #

A very simple flutter plugin project. Just show pdf from remote url on android/ios, support embedded widget.

Features #

On Android, first it use okhttp to download file to cache folder, then use built on AndroidPdfViewer to load file on local.

On IOS, it just use embedded webview to load url.

Note #

Add this to ios/Runner/info.plist to support embedded widget


If your pdf url is http not https, add this to


Add follow to android/app/build.gradle

 release {
            ndk {
                abiFilters "armeabi-v7a", "x86"

If you have some android compile error about android support-v4 or AndroidX. It may caused by android webview plugin, we could remove the plugin to fix.

  1. add this config to android/app/build.gradle top level
    all*.exclude module: "webview_flutter"
  1. create dir io.flutter.plugins.webviewflutter, create file with follow content
package io.flutter.plugins.webviewflutter;

import io.flutter.plugin.common.PluginRegistry;

public class WebViewFlutterPlugin {
    public static void registerWith(PluginRegistry.Registrar registrar) {
        //Do nothing

Install #

simple_pdf_viewer: ^0.2.1

License: Apache 2.0

Thanks #

Screenshot #


0.0.1 #

0.1.6 #

Fix android compile

0.1.7 #

Upgrade android kotlin version to 1.3.10

0.1.8 #

0.1.9 #

0.2.0 #

0.2.1 #

0.2.2 #


pdf_viewer_example #

Demonstrates how to use the pdf_viewer plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  simple_pdf_viewer: ^0.2.2

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:simple_pdf_viewer/simple_pdf_viewer.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Health suggestions

Format lib/simple_pdf_viewer.dart.

Run flutter format to format lib/simple_pdf_viewer.dart.

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
webview_flutter ^0.3.16 0.3.19+5
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8