Tech
Scrolling to an Index in a Flutter Lazy List, Without Building Everything Above It
You have a list of a million rows and you want to jump to row 842,013.
ScrollController.jumpTo takes a pixel offset, not an index. To convert one
to the other you need the total height of the 842,012 rows above your target —
and a lazy list has never built them, so it does not know how tall they are.
That is not an oversight. It is the entire point of a lazy list.
Flutter ships no answer. The two packages that did are both dead:
scrollable_positioned_list — archived by Goo...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to