Customize section class
tp7309 opened this issue · comments
You can define an section class as you like, the only requirement is implement ExpandableListSection, this is to provide item data list in section. Like this:
class Section implements ExpandableListSection<Widget> {
bool expanded;
Widget header;
List<Widget> items;
@override
List<Widget> getItems() {
return items;
}
@override
bool isSectionExpanded() {
return expanded;
}
@override
void setSectionExpanded(bool expanded) {
this.expanded = expanded;
}
}
``
class Section implements ExpandableListSection<Widget> {}
//so:
SliverExpandableChildDelegate<Widget, Section>()