infinite-carousel-flutter
infinite-carousel-flutter copied to clipboard
how to use dynamic height element, bcz it uses itemExtent and its restrict for dynamic height
Hi @rahulk3sharma, currently the package requires itemExtent because internally it uses SliverFixedExtentList to render the items on the viewport. I used this specifically because flutter docs mention that for large or infinite lists it is more efficient if extent is known beforehand, then it does not need to perform layout on its children to obtain their dimensions.
You can modify the package to use SliverList instead of SliverFixedExtentList for dynamic extent, it does not need the parameter itemExtent as it will calculate it for every item in the list. I will try if I can include it in the package too.