fluttercommunity / flutter_sticky_headers

Flutter Sticky Headers - Lets you place "sticky headers" into any scrollable content in your Flutter app. No special wrappers or magic required. Maintainer: @slightfoot
https://pub.dev/packages/sticky_headers
MIT License
1.11k stars 130 forks source link

What is the best practice on a large amount of items in content? #29

Open Masaokb opened 5 years ago

Masaokb commented 5 years ago

I use StickyHeader to make iOS-TableView-like UI and add Column of my widgets StickyHeader's content. But I suppose that the bigger the size of widgets, the less its rendering performance. Is there any ways like ListView.builder, which render just visible widgets instead of all ones?

Maybe related to #3.

sm2017 commented 3 years ago

@Masaokb Do you have any solution?

yasinarik commented 2 years ago

When ListView.builder is used with shrinkWrap: true, it all loses the on-demand rendering feature. In the end, it performs very inefficiently. Because shrinkWrap wants the ListView.builder to calculate all the children even if they are not on the screen.

I have tried putting SliverList with SliverChildBuilderDelegate inside the content property of StickyHeaderBuilder. However, it gave this error: A RenderStickyHeader expected a child of type RenderBox but received a child of type RenderSliverList.

So as of now, I also wonder how we can improve this package to allow it to render tens of thousands children efficiently.

Mohit8G commented 2 months ago

any solution to this problem?

Mohit8G commented 2 months ago

Found this https://medium.com/stackademic/flutter-sticky-header-implementing-efficient-solutions-for-large-lists-7ac6a72677db