native_pdf_view 1.0.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 83

native_pdf_view #

Attention! Doth use this plugin, It is in early development and full of errors. Use native_pdf_renderer instead

Flutter Plugin to render and show a PDF file . Supports both Android and iOS.

Getting Started #

In your flutter project add the dependency:

pub package

  native_pdf_view: any

For help getting started with Flutter, view the online documentation.

Usage example #

Import native_pdf_view.dart

import 'package:native_pdf_view/native_pdf_view.dart';

Rendering PDF files on Android devices #

Use the provided widget PdfRenderer in order to render a PDF file. This plugin uses the Android native PdfRenderer to render the pages of PDF files and provides a widget called PdfRenderer to display the PDF page you like.

1.0.2 #

  • Update example readme

1.0.1 #

  • Fix package details

1.0.0 #

  • Initial release


native_pdv_view #

Demonstrates how to use the flutter_pdf_renderer plugin.

import 'package:flutter/material.dart';
import 'package:native_pdf_view/native_pdf_view.dart';
import 'package:photo_view/photo_view.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('NativePDFView example app'),
        body: Container(
          child: NativePDFView(
            // Load from assets
            pdfFile: 'assets/sample.pdf',
            sAsset: true,
            // or load from file system
            // pdfFile: 'path/to/file',
            // isAsset: false,
            pageBuilder: (imageFile) => PhotoView(
              imageProvider: FileImage(imageFile),
              initialScale: .40,
              maxScale: 1.75,
              minScale: .40,
              backgroundDecoration: BoxDecoration(
                color: Colors.white,

Use this package as a library

1. Depend on it

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

  native_pdf_view: ^1.0.3

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:native_pdf_view/native_pdf_view.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 Oct 18, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
meta ^1.1.6 1.1.7
Transitive dependencies
collection 1.14.11 1.14.12
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8