InfiniteGridView constructor

const InfiniteGridView({
  1. required Function nextData,
  2. required Widget itemBuilder(
    1. BuildContext,
    2. int
    ),
  3. required int itemCount,
  4. required SliverGridDelegate gridDelegate,
  5. Key? key,
  6. Axis scrollDirection = Axis.vertical,
  7. bool reverse = false,
  8. ScrollController? controller,
  9. bool? primary,
  10. ScrollPhysics? physics,
  11. bool shrinkWrap = false,
  12. EdgeInsetsGeometry? padding,
  13. bool addAutomaticKeepAlives = true,
  14. bool addRepaintBoundaries = true,
  15. bool addSemanticIndexes = true,
  16. double? cacheExtent,
  17. int? semanticChildCount,
  18. double scrollThreshold = 300,
  19. bool hasNext = false,
  20. Widget? loadingWidget,
})

GridView that once the bottom is reach call nextData to load more element until hasNext is false Use loadingWidget to have a custom loading widget

Implementation

const InfiniteGridView({
  required this.nextData,
  required this.itemBuilder,
  required this.itemCount,
  required this.gridDelegate,
  Key? key,
  this.scrollDirection = Axis.vertical,
  this.reverse = false,
  this.controller,
  this.primary,
  this.physics,
  this.shrinkWrap = false,
  this.padding,
  this.addAutomaticKeepAlives = true,
  this.addRepaintBoundaries = true,
  this.addSemanticIndexes = true,
  this.cacheExtent,
  this.semanticChildCount,
  this.scrollThreshold = 300,
  this.hasNext = false,
  this.loadingWidget,
}) : super(key: key);