CollectionView<T> constructor
const
CollectionView<T> ({
- Key? key,
- required CollectionItemBuilder<
T> builder, - required dynamic data(),
- dynamic transform(
- List<
T> data
- List<
- Widget? empty,
- LoadingStyle? loadingStyle,
- String? stateName,
- Axis? scrollDirection,
- bool? reverse,
- ScrollController? controller,
- bool? primary,
- ScrollPhysics? physics,
- bool? shrinkWrap,
- EdgeInsets? padding,
- double? itemExtent,
- Widget? prototypeItem,
- ChildIndexGetter? findChildIndexCallback,
- bool addAutomaticKeepAlives = true,
- bool addRepaintBoundaries = true,
- bool addSemanticIndexes = true,
- double? cacheExtent,
- int? semanticChildCount,
- DragStartBehavior? dragStartBehavior,
- ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior,
- String? restorationId,
- Clip? clipBehavior,
- Widget? header,
- dynamic sort(
- List<
T> items
- List<
- 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;