list_view_with_data_source library

Classes

ListViewDataSource<SECTION, ITEM>
DataSource for ListViewWithDataSource. Hold display items for each section groups.
ListViewWithDataSource<SECTION, ITEM>
Build list according to the dataSource. dataSource should be ListViewDataSource or its subclass.

Typedefs

ItemBuilder<SECTION, ITEM> = Widget Function(BuildContext context, SECTION section, ITEM item, int sectionIndex, int itemIndex)
Build widget used in ListViewWithDataSource, which will display as item in section.
ItemSeparatorBuilder<SECTION, ITEM> = Widget? Function(BuildContext context, SECTION section, ITEM? item, int sectionIndex, int? itemIndex, {required bool insideSection})
Build separator widget used in ListViewWithDataSource, witch will display after the item. If insideSection is true, the widget displayed in between item views. If insideSection is false, the widget displayed in between header and item or between item and footer. When item is null and insideSection is false, the widget displayed between header and first item. If not needed, return null.
SectionFooterBuilder<SECTION> = Widget? Function(BuildContext context, SECTION section, int sectionIndex)
Build footer widget used in ListViewWithDataSource. The widget will display at foot of the section. If not needed, return null.
SectionHeaderBuilder<SECTION> = Widget? Function(BuildContext context, SECTION section, int sectionIndex)
Build header widget used in ListViewWithDataSource. The widget will display at head of the section. If not needed, return null.
SectionSeparatorBuilder<SECTION> = Widget? Function(BuildContext context, SECTION section, int sectionIndex)
Build separator between sections used in ListViewWithDataSource. If not needed, return null.