搜尋套件、儲存庫與 APP 分類

GitHub 儲存庫erluxman/pdf_flutter

pdf_flutter

用於顯示PDF的Flutter小部件

pdf_flutter 專案封面
星標
98
分支
50
最近推送(UTC)
2022年10月12日
專案狀態
未封存

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

pdf_flutter

pub package

Inspired by Pdf_Viewer_Plugin 😇 Wrapped around AndroidPdfViewer on Android. 🙏🏼

1. Add pdf_flutteron pubspec.yml
dependencies:
  pdf_flutter: ^version
2. On iOS enable PDF preview like this:

Add this on ios/Runner/info.plist:

    <key>io.flutter.embedded_views_preview</key>
    <true/>
3. Start Using
Load PDF from network (caches 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,
            maxAndroidZoom: widget.maxAndroidZoom,
            midAndroidZoom: widget.midAndroidZoom,
            minAndroidZoom: widget.minAndroidZoom,
    )
Load PDF files
    File fileName;  
    PDF.file(
        fileName,
        height: 200,
        width: 100,
        maxAndroidZoom: widget.maxAndroidZoom,
        midAndroidZoom: widget.midAndroidZoom,
        minAndroidZoom: widget.minAndroidZoom,
    )
Load PDF from assets
    PDF.assets(
        "assets/pdf/demo.pdf",
        height: 200,
        width: 100,
        maxAndroidZoom: widget.maxAndroidZoom,
        midAndroidZoom: widget.midAndroidZoom,
        minAndroidZoom: widget.minAndroidZoom,
    )
For Production
Here are the steps to fix:
    1. Add proguard-rules.pro file if its not already there
    2. Inside of the proguard-rules.pro file put this:
        -keep class com.shockwave.**
        -keepclassmembers class com.shockwave.** { *; }
        
    3.In app/build.gradle add this:
        shrinkResources true
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

Demo

demo

Laxman Bhattarai GitHub avatar
GitHub 作者

Laxman Bhattarai ↗

Android & Flutter Developer. Freelancer

FreelancerKathmandu Nepal官方網站 ↗
語言DartObjective-CRubyJava

此儲存庫發佈的套件

使用的依賴

依賴清單 6 項

如何選擇適合專案的儲存庫?

先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。

  1. 透過儲存庫名稱、作者或描述搜尋,再依技術分類縮小範圍。
  2. 綜合星標、分支與最近推送比較專案;星標反映社群關注,不保證品質。
  3. 使用前在 GitHub 確認 README、授權條款與 Issues。

來源與維護

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗