-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Use case
On large spreadsheet-like UIs with cells of different size, there is currently no way to optimize scrolling, which has to (lazily-)build all widgets when scrolling to a new position, resulting in laggy scrolling with a large amount of rows or complex widgets (particularly on Desktop where an arbitrary scroll position can be set by the user, or with search features that jump to a certain row, etc.).
The current itemExtent and prototypeItem properties only cover the use case where items all have the same size.
Proposal
Allow passing a property itemExtentPerIndex or similar in the ListView.builder constructor that is a function taking the index in the ListView as a parameter and returns the size in pixels. That way scrolling can be made smooth even if the items have different sizes inside of the ListView and are lazily built.
In case this is considered too much of an edge-case to put in the API, would you have hints (if it is possible) on how to implement this with a custom list view ?
Thank you very much.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status