Flutter PDF Downloader and Viewer App

Contents

Lets start by creating a flutter project. Go to your desired director open terminal and create a project  by using flutter create <project_name> and open in VsCode like in the screenshot given below.
 

Now we  are going to use two packages to make pdf download and viewing fucntionality. We use flutter_downloader package to download the pdf file and flutter_cachedpdf_view to view the downloaded pdf files and without downloading as well.

Lets install these two plugins first run these 2 commands in terminal

flutter pub add flutter_downloader
flutetr pub add flutter_cached_pdfview

Configuring Flutter Downloader - Android

<provider
    android:name="vn.hunghd.flutterdownloader.DownloadedFileProvider"
    android:authorities="${applicationId}.flutter_downloader.provider"
    android:exported="false"
    android:grantUriPermissions="true">
    <meta-data
        android:name="android.support.FILE_PROVIDER_PATHS"
        android:resource="@xml/provider_paths"/>
</provider>

Add the above code snippet in side the androidmanifest.xml