tp7309 / flutter_sticky_and_expandable_list

粘性头部与分组列表Sliver实现 Build a grouped list, which support expand/collapse section and sticky headers, support use it with sliver widget.
MIT License
140 stars 29 forks source link

Expand/Collapse All - New feature request #5

Closed kostaa closed 4 years ago

kostaa commented 4 years ago

First of all thanks you for this library. I have been waiting for one of these for quite some time :-)

One thing I think would be very useful is to the ability to expand/collapse all sections at the same time so the user does not have to do it one by one which is quite tedious especially for longer lists.

tp7309 commented 4 years ago

I'm also glad you used this library ^_^ Expand state is stored in section model, so just update all section expand state.

  setState(() {
    sectionList.forEach(
        (section) => section.setSectionExpanded(!section.isSectionExpanded()));
  });

Is this what you need?

kostaa commented 4 years ago

Yes thanks that is exactly what I need.