infinite_listview_package 1.0.0 infinite_listview_package: ^1.0.0 copied to clipboard
Infinite scroll listview widget in Flutter.
Infinite ListView #
Flutter package that provides infinite scroll listiview widget.
Getting Started #
Usage Guide #
- Create a class extending
InfiniteListView<T>
, where T is type of item on list you are going to build. - Implement method
getItemWidget(T item)
, this method should return widget for single item on list. - Implement method
getListData(int pageNumber)
, this isasync
method and should return list of item according to pageNumber in parameter. This method should returnFuture.error(...)
in case of error. - Override method
getPerPageCount()
to configure items per page. (Default is 10) - Override method
getNextPageThreshold()
to configure when should request for next page made. Value 5 means request for next page is made when user is seeing last 5 items on list. (Default is 5) - Override method
getLoadingWidget()
,getPaginationLoadingWidget()
,getErrorWidget(dynamic error)
,getPaginationErrorWidget(dynamic error)
to customize widgets while request in progress and error.