Dimibe / grouped_list

A Flutter ListView in which items can be grouped into sections.
https://pub.dev/packages/grouped_list
MIT License
407 stars 107 forks source link

index for group headers and separators #191

Open aytunch opened 1 year ago

aytunch commented 1 year ago

I am using flutter_staggered_animations along with this package.

And when the List is shown, I want to animate all the items sliding from right to left. I can do this with the actual items but not with the separators and group headers since I don't have the index for them.

flutter_staggered_animations package requires a position field so that it can stagger the items. @Dimibe Can we do the same you did with indexedItemBuilder for group and separators? But we would need a new field like totalIndex which includes all 3 types of widgets.

today[0] > itemA[1] > yesterday[2] > itemB[3] > separator[4] > itemC[5] I wrote the requested totalIndexs in square brackets

is this possible with the current architecture? thanks

aytunch commented 1 year ago

Hi @Dimibe I also don't want to show separators for some certain indexes. Having a way to access the index would be super beneficial. Thanks