onReady method
Called 1 frame after onInit(). It is the perfect place to enter navigation events, like snackbar, dialogs, or a new route, or async request.
Implementation
@override
Future<void> onReady() async {
super.onReady();
final document = path != null
? PdfDocument.openFile(path!)
: PdfDocument.openData(data!);
final controller = PdfController(
document: document,
initialPage: _current.value,
);
_pdfViewerController.value = controller;
controller.pageListenable.addListener(() {
_current.value = controller.page;
});
final imgs = await _loadThumbnails(await controller.document);
_images.value = imgs;
}