Dimibe / grouped_list

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

first item visibility change also changes the first group item to second one #161

Open Handelika opened 1 year ago

Handelika commented 1 year ago

I have two lists using StickyGroupedListView. when i click the the group item to change the children of group's visibility, group item name turned to the second one's name.


StickyGroupedListView<StateModel, int>(
          shrinkWrap: true,
          elements: list,
          physics: NeverScrollableScrollPhysics(),
          groupBy: (Model element) => element.headerId!,
          groupSeparatorBuilder: (Model element) => buildHeader(element),
          itemBuilder: (context, Model element) =>  element.isChecked ? buildItems(context, element) : Container() ,
          elementIdentifier: (element) => element.getId, // optional - see below for usage
          scrollDirection: Axis.vertical,
          itemScrollController: scrollListController,// optional
        )