PagewiseGridView<T>.extent constructor

PagewiseGridView<T>.extent({
  1. Key? key,
  2. EdgeInsetsGeometry? padding,
  3. required double maxCrossAxisExtent,
  4. double childAspectRatio = 1.0,
  5. double crossAxisSpacing = 0.0,
  6. double mainAxisSpacing = 0.0,
  7. bool addSemanticIndexes = true,
  8. int? semanticChildCount,
  9. bool? primary,
  10. bool shrinkWrap = false,
  11. ScrollController? controller,
  12. PagewiseLoadController<T>? pageLoadController,
  13. bool addAutomaticKeepAlives = true,
  14. Axis scrollDirection = Axis.vertical,
  15. bool addRepaintBoundaries = true,
  16. double? cacheExtent,
  17. ScrollPhysics? physics,
  18. bool reverse = false,
  19. int? pageSize,
  20. PageFuture<T>? pageFuture,
  21. LoadingBuilder? loadingBuilder,
  22. RetryBuilder? retryBuilder,
  23. NoItemsFoundBuilder? noItemsFoundBuilder,
  24. bool showRetry = true,
  25. required ItemBuilder<T> itemBuilder,
  26. ErrorBuilder? errorBuilder,
})

Creates a Pagewise GridView with a maxCrossAxisExtent.

All the properties are either those documented for normal GridViews or those inherited from Pagewise

Implementation

PagewiseGridView.extent(
    {Key? key,
    EdgeInsetsGeometry? padding,
    required double maxCrossAxisExtent,
    double childAspectRatio = 1.0,
    double crossAxisSpacing = 0.0,
    double mainAxisSpacing = 0.0,
    bool addSemanticIndexes = true,
    int? semanticChildCount,
    bool? primary,
    bool shrinkWrap: false,
    ScrollController? controller,
    PagewiseLoadController<T>? pageLoadController,
    bool addAutomaticKeepAlives: true,
    Axis scrollDirection: Axis.vertical,
    bool addRepaintBoundaries: true,
    double? cacheExtent,
    ScrollPhysics? physics,
    bool reverse: false,
    int? pageSize,
    PageFuture<T>? pageFuture,
    LoadingBuilder? loadingBuilder,
    RetryBuilder? retryBuilder,
    NoItemsFoundBuilder? noItemsFoundBuilder,
    bool showRetry: true,
    required ItemBuilder<T> itemBuilder,
    ErrorBuilder? errorBuilder})
    : super(
          pageSize: pageSize,
          pageFuture: pageFuture,
          pageLoadController: pageLoadController,
          key: key,
          loadingBuilder: loadingBuilder,
          retryBuilder: retryBuilder,
          showRetry: showRetry,
          itemBuilder: itemBuilder,
          errorBuilder: errorBuilder,
          noItemsFoundBuilder: noItemsFoundBuilder,
          builder: (PagewiseState<T> state) {
            return GridView.builder(
                reverse: reverse,
                physics: physics,
                cacheExtent: cacheExtent,
                addRepaintBoundaries: addRepaintBoundaries,
                scrollDirection: scrollDirection,
                addAutomaticKeepAlives: addAutomaticKeepAlives,
                addSemanticIndexes: addSemanticIndexes,
                semanticChildCount: semanticChildCount,
                controller: controller,
                primary: primary,
                shrinkWrap: shrinkWrap,
                padding: padding,
                gridDelegate:
                    SliverGridDelegateWithMaxCrossAxisExtentAndLoading(
                        maxCrossAxisExtent: maxCrossAxisExtent,
                        childAspectRatio: childAspectRatio,
                        crossAxisSpacing: crossAxisSpacing,
                        mainAxisSpacing: mainAxisSpacing,
                        itemCount: state._itemCount),
                itemCount: state._itemCount,
                itemBuilder: state._itemBuilder);
          });