Build a grouped list, which support expand/collapse section and sticky header.
Use it with CustomScrollView、SliverAppBar.
Listen the scroll offset of current sticky header, current sticky header index and switching header index.
Only use one list widget, so it supports large data and a normal memory usage.
More section customization support, you can return a new section widget by sectionBuilder, to customize background,expand/collapse animation, section layout, and so on.
In the pubspec.yaml of your flutter project, add the following dependency:
dependencies:sticky_and_expandable_list:^1.1.3
Basic Usage
sectionList is a custom data source for ExpandableListView.
We should create a model list to store the information of each section, the model must implement ExpandableListSection.