packages.flutter
packages.flutter copied to clipboard
[native_pdf_view] How to get last page read of pdf save with sharedpreferences ?
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like A clear and concise description of what you want to happen.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.
onPageChanged: (int page) {
_lastPage = page;
// save on SharedPreferences
}
// load _lastPage on initState and then setState whit the pdfController.
_pdfController = PdfController(
document: PdfDocument.openFile(filePathOnRam),
initialPage: _bookmarkPosition ?? 0,
);