Open ThiagoBfim opened 4 years ago
I Had some problemens when i tried to use a pdf with just one page. I want to hide BottomNavigationBar, but it's impossible.
Code with error:
`void main() => runApp(MyApp());
class MyApp extends StatefulWidget { @override _MyAppState createState() => _MyAppState(); }
class _MyAppState extends State { bool _isLoading = true; PDFDocument document;
@override void initState() { super.initState(); loadDocument(); }
loadDocument() async { document = await PDFDocument.fromURL('https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf'); setState(() => _isLoading = false); }
@override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( appBar: AppBar( title: const Text('FlutterPluginPDFViewer'), ), body: Center( child: _isLoading ? Center(child: CircularProgressIndicator()) : PDFViewer(document: document, showNavigation: false,)), ), ); } } `
I Had some problemens when i tried to use a pdf with just one page. I want to hide BottomNavigationBar, but it's impossible.
Code with error:
`void main() => runApp(MyApp());
class MyApp extends StatefulWidget { @override _MyAppState createState() => _MyAppState(); }
class _MyAppState extends State {
bool _isLoading = true;
PDFDocument document;
@override void initState() { super.initState(); loadDocument(); }
loadDocument() async { document = await PDFDocument.fromURL('https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf'); setState(() => _isLoading = false); }
@override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( appBar: AppBar( title: const Text('FlutterPluginPDFViewer'), ), body: Center( child: _isLoading ? Center(child: CircularProgressIndicator()) : PDFViewer(document: document, showNavigation: false,)), ), ); } } `