XCollectionView<T>.list constructor
const
XCollectionView<T>.list ({
- required XScrollItemBuilder<
T> itemBuilder, - Key? key,
- XScrollFetcher<
T> ? onInit, - XScrollFetcher<
T> ? onLoadMore, - ValueChanged<
List< ? onItemsChanged,T> > - XScrollItemTap<
T> ? onItemTap, - List<
T> initialItems = const [], - bool initialHasMore = true,
- int pageSize = 20,
- bool autoLoad = true,
- bool enableRefresh = true,
- Axis scrollDirection = Axis.vertical,
- double refreshTriggerExtent = 80,
- double paginationThreshold = 200,
- ScrollController? controller,
- EdgeInsetsGeometry? padding,
- ScrollPhysics? physics,
- IndexedWidgetBuilder? separatorBuilder,
- Widget? header,
- WidgetBuilder? loadingBuilder,
- WidgetBuilder? emptyBuilder,
- XScrollErrorBuilder? errorBuilder,
- WidgetBuilder? paginationLoadingBuilder,
- XScrollErrorBuilder? paginationErrorBuilder,
- XScrollRefreshIndicatorBuilder? refreshIndicatorBuilder,
- bool shrinkWrap = false,
- bool reverse = false,
- double? cacheExtent,
Creates a paginated list collection.
Implementation
const XCollectionView.list({
required this.itemBuilder,
super.key,
this.onInit,
this.onLoadMore,
this.onItemsChanged,
this.onItemTap,
this.initialItems = const [],
this.initialHasMore = true,
this.pageSize = 20,
this.autoLoad = true,
this.enableRefresh = true,
this.scrollDirection = Axis.vertical,
this.refreshTriggerExtent = 80,
this.paginationThreshold = 200,
this.controller,
this.padding,
this.physics,
this.separatorBuilder,
this.header,
this.footer,
this.loadingBuilder,
this.emptyBuilder,
this.errorBuilder,
this.paginationLoadingBuilder,
this.paginationErrorBuilder,
this.refreshIndicatorBuilder,
this.shrinkWrap = false,
this.reverse = false,
this.cacheExtent,
}) : layout = XCollectionLayout.list,
gridDelegate = null;