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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expand/Collapse All - New feature request

kostaa opened this issue · comments

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.

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?

Yes thanks that is exactly what I need.