v1.1.4
pdf_flutter
Flutter 위젯에서 이미지를 표시하는 것처럼 네트워크, 파일 및 자산에서 PDF를 쉽게 표시합니다.
71좋아요 2830일 다운로드40Pub 점수
플랫폼 정보 없음
PDF를 표시하는 Flutter 위젯
{"sdk":"flutter"}^3.3.0^0.13.4^2.0.9{"sdk":"flutter"}^1.11.0아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
Inspired by Pdf_Viewer_Plugin 😇 Wrapped around AndroidPdfViewer on Android. 🙏🏼
pdf_flutteron pubspec.ymldependencies:
pdf_flutter: ^version
Add this on ios/Runner/info.plist:
<key>io.flutter.embedded_views_preview</key>
<true/>
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,
)
File fileName;
PDF.file(
fileName,
height: 200,
width: 100,
maxAndroidZoom: widget.maxAndroidZoom,
midAndroidZoom: widget.midAndroidZoom,
minAndroidZoom: widget.minAndroidZoom,
)
PDF.assets(
"assets/pdf/demo.pdf",
height: 200,
width: 100,
maxAndroidZoom: widget.maxAndroidZoom,
midAndroidZoom: widget.midAndroidZoom,
minAndroidZoom: widget.minAndroidZoom,
)
Here are the steps to fix:
1. Add proguard-rules.pro file if its not already there
https://user-images.githubusercontent.com/2768159/91779534-e288fd00-ebc3-11ea-9c6f-d3e3a9d0922c.png
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:
https://user-images.githubusercontent.com/2768159/91779653-37c50e80-ebc4-11ea-8fbb-22d5c8e5a9ed.png
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
demo