VoGroupedView<T, G>.grid constructor

const VoGroupedView<T, G>.grid({
  1. Key? key,
  2. required List<T> items,
  3. required G groupBy(
    1. T item
    ),
  4. required VoGroupItemBuilder<T> itemBuilder,
  5. required SliverGridDelegate gridDelegate,
  6. VoGroupBuilder<T, G>? groupHeaderBuilder,
  7. VoGroupBuilder<T, G>? groupFooterBuilder,
  8. Comparator<G>? groupComparator,
  9. Comparator<T>? itemComparator,
  10. bool stickyHeaders = false,
  11. VoItemAnimation? animation,
  12. Object? itemKey(
    1. T item
    )?,
  13. Future<void> onLoadMore()?,
  14. bool hasMore = false,
  15. double loadMoreThreshold = 200,
  16. Widget? loadingMore,
  17. Future<void> onRefresh()?,
  18. Widget? header,
  19. Widget? footer,
  20. Widget? empty,
  21. EdgeInsetsGeometry groupPadding = EdgeInsets.zero,
  22. EdgeInsetsGeometry padding = EdgeInsets.zero,
  23. ScrollController? controller,
  24. bool? primary,
  25. ScrollPhysics physics = const AlwaysScrollableScrollPhysics(parent: BouncingScrollPhysics()),
  26. bool shrinkWrap = false,
  27. 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',
     );