Last updated:
0 purchases
scrumlab pdf flutter
scrumlab_pdf_flutter #
Inspired by Pdf_Viewer_Plugin 😇
Wrapped around AndroidPdfViewer on Android. 🙏🏼
1. Add scrumlab_pdf_flutteron pubspec.yml #
dependencies:
scrumlab_pdf_flutter: ^version
copied to clipboard
2. On iOS enable PDF preview like this: #
Add this on ios/Runner/info.plist:
<key>io.flutter.embedded_views_preview</key>
<true/>
copied to clipboard
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,
)
copied to clipboard
Load PDF files
File fileName;
PDF.file(
fileName,
height: 200,
width: 100,
)
copied to clipboard
Load PDF from assets
PDF.assets(
"assets/pdf/demo.pdf",
height: 200,
width: 100,
)
copied to clipboard
For Production
Here are the steps to fix:
1. Add proguard-rules.pro file if its not already there
copied to clipboard
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:
copied to clipboard
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
copied to clipboard
Demo #
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.