Closed Stumblinbear closed 11 months ago
cacheExtent
builds all the items that are inside of its radius; to build the item, they must exist and be requested. They are also laid out, according to the documentation.
Given this, I dont know how what you request could be possible. You are essentially instructing the scrollview to build many items, and therefore many items are built.
Ideally you could cacheExtent
only items above the viewport, not below. A large cacheExtent
is necessary for visual scrollbar consistency, but that doesn't have to include the exact same amount of items below the viewport, so you could delay loading new items until you reach nearly the bottom of the list visually (not necessarily at the whims of cacheExtent
). If this is a limitation of Flutter and not this library, then oke doke
I'm using the
cacheExtent
property on aCustomScrollView
in order to keep the size of the scrollbar relatively consistent. This is because each item in my list is not guaranteed to be the same height (there can be relatively large variations). However, this causes thePagedSliverList
to load items much deeper in the list than is necessary. My scrollbar rarely gets further than halfway down the screen due to the necessity of a largecacheExtent
(5k-10k pixels).Is there a way to use the visual location (viewport?) of the end of the list rather than the items that haven't been laid out?