ListView bad performance and widget interfaces

General Conversations

Hello,

I've experienced some problems and bad performance (sluggishness, jumping, jank overall) using the ListView widget. Doing some research in the net it seems I'm not alone. There are many comments about this. All the problem seems to be related to the building and disposal of children out of view (which is necessary for very long or infinite lists), specially when their size is not fixed. There is an old and long thread on GitHub about this open issue:

https://github.com/flutter/flutter/issues/52207

There is a package in pub.dev that seems to address this functionality much better which is super_sliver_list. It offers a ListView replacement with the same contract, which is SuperListView. It even adds the possibility of positioning the list at a specific child by its index. The developers have a demo and it performs very well.

I wonder if FF team would not consider treating the ListView widget as an interface and let the developers choose the implementation of their choice. For my use case, the current performance of ListView is very disappointing to the point of being unusable. I would like to continue the project in FF for many reasons (mainly it's easier!) but this is a very serious issue that makes me wonder if I shouldn't switch to coding in VS or similar.

Although this discussion originates from a related to a specific problem with ListView, I think it's worth discussing the possibility of not depending on some specific widgets but on interfaces. This could also apply to other layout elements and would add greater flexibility. Maybe it would be difficult to agree on the common contract but it shouldn't be that much.

Llorenc

1