Flutter, Open Hyperlink In PDF In Browser
I have a Problem with Links in PDF's. When clicking on them in the App, the App open the Website in the App itself. I want them to open in the browser instead. Anyone knows a lib that is handling this the way I want? I used different PDF libs and in Both I had this issue. Libs I Used are:
This is the Code Example for PDF_Flutter. I also tried to download the PDF itself and reading it via Network.assets instead of Network, same Issue clicking on links opens the website in the same View. Are PDF_flutter and flutter_full_pdf_viewer working on Webviews or how is that even a thing??
Scaffold( appBar: CustomAppBar("", false, ""), body: Stack( children: <Widget>[ PDF.network( widget.url, width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height, placeHolder: Center( child: CircularProgressIndicator( valueColor: AlwaysStoppedAnimation( Color(0xFFE41B13), ), ), ), ), ], ), );
So after testing like 6 Flutter Plugin for PDF's I found one that open links in the Browser. Flutter_pdfview
You just need to set "preventLinkNavigation" to false and that's it.
PDFView( filePath: widget.path, preventLinkNavigation: false, <---- ... )
- → How do you create a 12 or 24 mnemonics code for multiple cryptocurrencies (ETH, BTC and so on..)
- → Flutter: input text field don't work properly in a simple example..... where am I wrong?
- → Can I customize the code formatting of Dart code in Atom?
- → Is it possible to develop iOS apps with Flutter on a Linux virtual machine?
- → Display SnackBar in Flutter
- → JSON ObjectMapper in Flutter
- → Material flutter app source code
- → TabBarSelection No such method error
- → How do I set the animation color of a LinearProgressIndicator?
- → Add different routes/screens to Flutter app
- → Is there a way to get the size of an existing widget?
- → How to share a file using flutter
- → Is there an easy way to find particular text built from RichText in a Flutter test?