pdftron-flutter
pdftron-flutter copied to clipboard
`await controller.openDocument()` is not being waited on
Describe the bug
Other DocumentViewController
methods are running before openDocument()
finishes even though the await
keyword is being used. When debugging with Android Studio, I realized that onTabDocumentLoaded
was not being called after openDocument
.
Steps to Reproduce the Problem
- Use
example/lib/main.dart
and uncomment the code needed to use the widget view. - In
onDocumentViewCreated
place any method call afterawait controller.openDocument(_document, config: config);
, where_document
= "https://pdftron.s3.amazonaws.com/downloads/pl/PDFTRON_mobile_about.pdf" - Run app
Expected behavior The document would have opened as normal and the methods called would have ran in order.
Screenshots
Call stack:
Platform/Device Information (please complete the following information if applicable):
- Platform: Android
- Device: Pixel 3a
- OS: Android 11