VoGroupedView<T, G>.grid constructor
const
VoGroupedView<T, G>.grid ({
- Key? key,
- required List<
T> items, - required G groupBy(
- T item
- required VoGroupItemBuilder<
T> itemBuilder, - required SliverGridDelegate gridDelegate,
- VoGroupBuilder<
T, G> ? groupHeaderBuilder, - Comparator<
G> ? groupComparator, - Comparator<
T> ? itemComparator, - bool stickyHeaders = false,
- VoItemAnimation? animation,
- Object? itemKey(
- T item
- Future<
void> onLoadMore()?, - bool hasMore = false,
- double loadMoreThreshold = 200,
- Widget? loadingMore,
- Future<
void> onRefresh()?, - Widget? header,
- Widget? empty,
- EdgeInsetsGeometry groupPadding = EdgeInsets.zero,
- EdgeInsetsGeometry padding = EdgeInsets.zero,
- ScrollController? controller,
- bool? primary,
- ScrollPhysics physics = const AlwaysScrollableScrollPhysics(parent: BouncingScrollPhysics()),
- bool shrinkWrap = false,
- ScrollCacheExtent? scrollCacheExtent,
Implementation
const VoGroupedView.grid({
super.key,
required this.items,
required this.groupBy,
required this.itemBuilder,
required SliverGridDelegate this.gridDelegate,
this.groupHeaderBuilder,
this.groupFooterBuilder,
this.groupComparator,
this.itemComparator,
this.stickyHeaders = false,
this.animation,
this.itemKey,
this.onLoadMore,
this.hasMore = false,
this.loadMoreThreshold = 200,
this.loadingMore,
this.onRefresh,
this.header,
this.footer,
this.empty,
this.groupPadding = EdgeInsets.zero,
this.padding = EdgeInsets.zero,
this.controller,
this.primary,
this.physics = const AlwaysScrollableScrollPhysics(
parent: BouncingScrollPhysics(),
),
this.shrinkWrap = false,
this.scrollCacheExtent,
}) : separatorBuilder = null,
assert(
!hasMore || onLoadMore != null,
'\n\n[VoGroupedView.grid] onLoadMore must be provided when hasMore '
'is true.\n',
);