r/FlutterDev • u/erluxman • Jun 27 '20
Article I just open-sourced `pdf_flutter` a Widget to display PDF easily like Image.
I just released a plugin to display PDF in Flutter.
Now, it's super easy to load PDF from the network like it was loading images from the network.
I spent 2 days trying to display PDF easily in Flutter and I hope it will help other devs save some of their time.
Add
pdf_flutteron pubspec.ymldependencies: pdf_flutter: ^versionOn
iOSenable PDF preview like by adding this on ios/Runner/info.plist:<key>io.flutter.embedded_views_preview</key> <true/>Start Using
PDF.network( 'https://raw.githubusercontent.com/FlutterInThai/Dart-for-Flutter-Sheet-cheet/master/Dart-for-Flutter-Cheat-Sheet.pdf', height: 500, width: 300,)
See demo and plugin here: pdf_flutter
2
10
1
1
u/costico123 Jun 28 '20
Just a random question , I have experience in c++ and java , but I don't know how do to get started with flutter , I am thinking of doing freecodecamps dart in 2hrs , can someone help me with how I should get started ?
1
u/erluxman Jun 28 '20
https://twitter.com/imthepk/status/1213003226070437891
These two links might be the best suggestion that I can give.
2
0
Jun 27 '20
[deleted]
9
u/erluxman Jun 27 '20
I will definitely do that.
I published this late at night so I had missed this aspect.
Thanks for the feedback..
1
u/erluxman Jun 28 '20
Updated it.. :) Can you have a look at it once & let me know if I can improve?
1
u/billylks Jun 28 '20
Controller to let dart code to jump to a page number
Hide the "1 of xxxx" indicator so that it is easier for internationalisation. Also a listener for dart code to display page number etc.
1
5
u/jahp21 Jun 27 '20
Nice work! Planning to do it for web?