Closed yazanIbrahim closed 3 years ago
a blank screen is displayed when changing orientation
Steps to reproduce the behavior:
Expected behaviour the pdf file should continue displaying
Smartphone (please complete the following information):
sample code ` class PDFViewer extends StatefulWidget { final String url;
PDFViewer({@required this.url});
@override _PDFViewerState createState() => _PDFViewerState(); }
class _PDFViewerState extends State {
@override Widget build(BuildContext context) { return View( builder: (context, model, child) { return Scaffold( body: SafeArea( child: PDF( nightMode: true, onError: (error){ print("err"); print(error.toString()); } ).cachedFromUrl( widget.url, placeholder: (progress) => Center(child: Text('$progress %')), errorWidget: (error) => Center(child: Text(error.toString())), ), ), ); }, ); } }`
hi @yazanIbrahim please take a look at this workaround https://github.com/endigo/flutter_pdfview/issues/9#issuecomment-532824876
a blank screen is displayed when changing orientation
Steps to reproduce the behavior:
Expected behaviour the pdf file should continue displaying
Smartphone (please complete the following information):
sample code ` class PDFViewer extends StatefulWidget { final String url;
PDFViewer({@required this.url});
@override _PDFViewerState createState() => _PDFViewerState(); }
class _PDFViewerState extends State {
@override Widget build(BuildContext context) { return View( builder: (context, model, child) { return Scaffold( body: SafeArea( child: PDF( nightMode: true, onError: (error){ print("err"); print(error.toString()); } ).cachedFromUrl( widget.url, placeholder: (progress) => Center(child: Text('$progress %')), errorWidget: (error) => Center(child: Text(error.toString())), ), ), ); }, ); } }`