Skip to content

Conversation

@ThiagoBfim
Copy link

@ThiagoBfim ThiagoBfim commented Aug 6, 2020

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,)),
),
);
}
}
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant