CollectionView<T> constructor

const CollectionView<T>({
  1. Key? key,
  2. required CollectionItemBuilder<T> builder,
  3. required dynamic data(),
  4. dynamic transform(
    1. List<T> data
    )?,
  5. Widget? empty,
  6. LoadingStyle? loadingStyle,
  7. String? stateName,
  8. Axis? scrollDirection,
  9. bool? reverse,
  10. ScrollController? controller,
  11. bool? primary,
  12. ScrollPhysics? physics,
  13. bool? shrinkWrap,
  14. EdgeInsets? padding,
  15. double? itemExtent,
  16. Widget? prototypeItem,
  17. ChildIndexGetter? findChildIndexCallback,
  18. bool addAutomaticKeepAlives = true,
  19. bool addRepaintBoundaries = true,
  20. bool addSemanticIndexes = true,
  21. double? cacheExtent,
  22. int? semanticChildCount,
  23. DragStartBehavior? dragStartBehavior,
  24. ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior,
  25. String? restorationId,
  26. Clip? clipBehavior,
  27. Widget? header,
  28. dynamic sort(
    1. List<T> items
    )?,
  29. double? spacing,
})

Implementation

const CollectionView({
  super.key,
  required this.builder,
  required Function() data,
  this.transform,
  this.empty,
  this.loadingStyle,
  this.stateName,
  this.scrollDirection,
  this.reverse,
  this.controller,
  this.primary,
  this.physics,
  this.shrinkWrap,
  this.padding,
  this.itemExtent,
  this.prototypeItem,
  this.findChildIndexCallback,
  this.addAutomaticKeepAlives = true,
  this.addRepaintBoundaries = true,
  this.addSemanticIndexes = true,
  this.cacheExtent,
  this.semanticChildCount,
  this.dragStartBehavior,
  this.keyboardDismissBehavior,
  this.restorationId,
  this.clipBehavior,
  this.header,
  this.sort,
  this.spacing,
}) : kind = CollectionViewKind.builder,
     separatorBuilder = null,
     crossAxisCount = null,
     mainAxisSpacing = null,
     crossAxisSpacing = null,
     isPullable = false,
     paginatedData = null,
     onRefresh = null,
     beforeRefresh = null,
     afterRefresh = null,
     headerStyle = null,
     footerLoadingIcon = null,
     this.data = data;