PdfViewer is slow when scrolling on mobile, is there settings to speed it up ?
Hi, first of all, thanks for you amazing work on this lib @espresso3389 we really appreciate as the flutter community
now the PdfViewer is pretty slow at scrolling than the normal list in flutter i saw some settings in the class related to scrolling but could you please clarify if there is a settings to make it just normal speed scrolling like other flutter lists
for now with the default params of PDFViewer it is pretty slow on mobile (test it on android only tho)
would be really happy to hear your response
By chance, I added scrollPhysics and scrollPhysicsScale params and it somehow make the PDF scroll speed more natural.
params: const PdfViewerParams(
scrollPhysics: FixedOverscrollPhysics(maxOverscroll: 100),
scrollPhysicsScale: BouncingScrollPhysics(),
)
I don't know if it is a legitimate fix or not.
Thanks that worked well @SlickSlime 👍
By chance, I added
scrollPhysicsandscrollPhysicsScaleparams and it somehow make the PDF scroll speed more natural.params: const PdfViewerParams( scrollPhysics: FixedOverscrollPhysics(maxOverscroll: 100), scrollPhysicsScale: BouncingScrollPhysics(), ) I don't know if it is a legitimate fix or not.
Yes, this is exactly what scrollPhysics is for. FixedOverscrollPhysics is good for Android, but if you want to support iOS too, then you want to use BouncingScrollPhysics() which has quite a different scrolling behavior. You can just use this convenience method and it works for both:
scrollPhysics: PdfViewerParams.getScrollPhysics(context)
So if many users feel that the scroll speed is slow, should we provide appropriate (faster) default value for PdfViewerParams.getScrollPhysics?
Or if #547 is fixed, should we use the value from PdfViewerParams.getScrollPhysics as the default value for null case?
So if many users feel that the scroll speed is slow, should we provide appropriate (faster) default value for
PdfViewerParams.getScrollPhysics?Or if #547 is fixed, should we use the value from
PdfViewerParams.getScrollPhysicsas the default value for null case?
It's going to be a changed experience for users, but a positive one. Perhaps for version 3.0 we make it the default when scrollPhysics is not specified as you suggest. Good to do this change on a major release.