Show PDF Inline File for iOS in Flutter

When I was implementing the functionality for PDF viewer, there was no PDF plugin.

However, funny enough a friend at work found out that there is already a PDF viewer implemented for Flutter here, which we ended up using.

Note: At the time of writing the question, 16.08 there was not yet any plugin available. The mentioned was created on 30.08.


If you are looking for quick and easy way to display PDF, this might be the one.

pdf_flutter

Load PDF from network:

PDF.network(
        'https://raw.githubusercontent.com/FlutterInThai/Dart-for-Flutter-Sheet-cheet/master/Dart-for-Flutter-Cheat-Sheet.pdf',
        height: 500,
        width: 300,
        )

Load PDF from files:

File fileName;  
PDF.file(
    fileName,
    height: 200,
    width: 100,
)

Load PDF from assets:

PDF.assets(
    "assets/pdf/demo.pdf",
    height: 200,
    width: 100,
)

enter image description here

Tags:

Ios

Pdf

Flutter