XCollectionView<T>.list constructor

const XCollectionView<T>.list({
  1. required XScrollItemBuilder<T> itemBuilder,
  2. Key? key,
  3. XScrollFetcher<T>? onInit,
  4. XScrollFetcher<T>? onLoadMore,
  5. ValueChanged<List<T>>? onItemsChanged,
  6. XScrollItemTap<T>? onItemTap,
  7. List<T> initialItems = const [],
  8. bool initialHasMore = true,
  9. int pageSize = 20,
  10. bool autoLoad = true,
  11. bool enableRefresh = true,
  12. Axis scrollDirection = Axis.vertical,
  13. double refreshTriggerExtent = 80,
  14. double paginationThreshold = 200,
  15. ScrollController? controller,
  16. EdgeInsetsGeometry? padding,
  17. ScrollPhysics? physics,
  18. IndexedWidgetBuilder? separatorBuilder,
  19. Widget? header,
  20. Widget? footer,
  21. WidgetBuilder? loadingBuilder,
  22. WidgetBuilder? emptyBuilder,
  23. XScrollErrorBuilder? errorBuilder,
  24. WidgetBuilder? paginationLoadingBuilder,
  25. XScrollErrorBuilder? paginationErrorBuilder,
  26. XScrollRefreshIndicatorBuilder? refreshIndicatorBuilder,
  27. bool shrinkWrap = false,
  28. bool reverse = false,
  29. 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;