Dimibe / grouped_list

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

Possible enhancement to indexedItemBuilder ? #104

Closed RamithRD closed 2 years ago

RamithRD commented 3 years ago

I have a requirement to show numbering for items in each group, I'd like to know what's the best way to achieve this.

Ex :

Group A
  1.
  2.
  3.
Group B
  1.
  2.
Group C
  1.

The numbering should reset for each group, therefore the index from indexedItemBuilder cannot be used.

Appreciate your input.

Fintasys commented 3 years ago

@RamithRD Not sure if it works - I just tested it shortly, but couldn't you have a separate index variable and reset it inside groupSeparatorBuilder-method?

Dimibe commented 2 years ago

@Fintasys solution should work

mikemoore13 commented 1 year ago

did not suceed to make this work, could you provide a sample ?