Taskulu / sliver_expandable

A Sliver Flutter widget that can be used to expand or collapse another child Sliver widget
https://pub.dev/packages/sliver_expandable
MIT License
4 stars 2 forks source link

Non expanded children are build lazy #2

Open zellidev0 opened 3 months ago

zellidev0 commented 3 months ago

Hi,

I'm using the package for a expandable Tree structure, that's indefinitely nested. It looks to me that the widget does not build the children widgets lazily.

Am I correct in this assumption? And if so, is there a reason for that?

Wouldn't it be beneficial, if the widgets that are expanded would only be build, when they are expanded?

Thanks.

Amir-P commented 3 months ago

Hi! Thanks for pointing it out. Right now, not only the sliver will be built even if it's not expanded, in case of something like SliverList, the children gets built too based on the offset. I haven't found the time to do the optimizations and surely there's a lot to do. I will work on them but in the meantime feel free to contribute.