dynamic_paging_listview_widget 0.0.6+1 dynamic_paging_listview_widget: ^0.0.6+1 copied to clipboard
A dynamic scrollable flutter ListView with pagination feature and flexible customization on UI Flutter Widget.
Features #
Flutter package for listview with pagination.
Warning I build this package for my own usage. I not perform test outside my own needs and my flutter environment.
Basic Usage #
First setup list controller
PageableListViewController<int> controller =
PageableListViewController<int>();
Passing list controller to widget
PageableListView<int>(
controller: controller,
onRefresh: onRefresh,
onFetchNextPage: onFetchNextPage,
buildertopWidget: (context) => [
_Filter(
isSelectedAll: controller.isSelectedAllItem,
selectAllAction: () => controller.selectAllItem(
isSetToSelected: !controller.isSelectedAllItem),
),
],
stickToTopWidget: false,
stickToTopWidgetPaddingTop: 50,
builderbottomWidget: (context) => const [
_EndPage(),
],
loadingWidget: [
_Filter(
isSelectedAll: controller.isSelectedAllItem,
selectAllAction: () => controller.selectAllItem(
isSetToSelected: !controller.isSelectedAllItem),
),
const Expanded(
child: Center(
child: CircularProgressIndicator(),
))
],
loadingNextPageBuilder: (context, page) => _LoadingNextPageWidget(
page: page,
),
stickToBottomWidget: false,
//stickToBottomWidget: true,
itemBuilder: (context, index, item) {
return Ink(
child: InkWell(
onTap: () => controller.selectItem(
data: item, isSetToSelected: !item.isSelected),
child: _Item(
index: item.data,
currentPage: item.page,
isSelected: item.isSelected,
),
),
);
},
Setup scroll direction #
By default scroll direction is vertical mode
PageableListViewController<int> controller = PageableListViewController<int>(direction: Axis.vertical);
To setup scroll direction to horizontal mode
PageableListViewController<int> controller = PageableListViewController<int>(
direction: Axis.horizontal, enabledPullLeftReload: true);
For more usage examples, please take check out the example project.