divider_list 0.0.2 divider_list: ^0.0.2 copied to clipboard
A List that places items of another list as a divider between each item.
A List that places items of another list as a divider between each item.
Features #
- Support for both SliverList and ListView
- Easy to use : You only need to pass lengths of both lists
Usage #
SliverDividerList #
SliverDividerList(mainListItemBuilder: (BuildContext context, int index) {
return mainList[index];
},
dividerListItemBuilder: (BuildContext context, int index) {
return dividerList[index];
},
mainListItemLength: mainList.length,
dividerListItemLength: dividerList.length,
),
DividerListView #
DividerListView(mainListItemBuilder: (BuildContext context, int index) {
return mainList[index];
},
dividerListItemBuilder: (BuildContext context, int index) {
return dividerList[index];
},
mainListItemLength: mainList.length,
dividerListItemLength: dividerList.length,
),