NyPullToRefresh<T>.grid constructor

NyPullToRefresh<T>.grid({
  1. Key? key,
  2. int? crossAxisCount = 2,
  3. double? mainAxisSpacing = 0,
  4. double? crossAxisSpacing = 0,
  5. dynamic onRefresh()?,
  6. dynamic beforeRefresh()?,
  7. dynamic afterRefresh(
    1. dynamic data
    )?,
  8. required Future data(
    1. int iteration
    ),
  9. List<T> transform(
    1. List<T>
    )?,
  10. required Widget child(
    1. BuildContext context,
    2. dynamic data
    ),
  11. Widget? empty,
  12. Widget? loading,
  13. String? stateName,
  14. Axis? scrollDirection,
  15. bool? reverse,
  16. ScrollController? controller,
  17. bool? primary,
  18. ScrollPhysics? physics,
  19. bool? shrinkWrap,
  20. EdgeInsets? padding = EdgeInsets.zero,
  21. double? itemExtent,
  22. Widget? prototypeItem,
  23. ChildIndexGetter? findChildIndexCallback,
  24. bool addAutomaticKeepAlives = true,
  25. bool addRepaintBoundaries = true,
  26. bool addSemanticIndexes = true,
  27. double? cacheExtent,
  28. int? semanticChildCount,
  29. DragStartBehavior? dragStartBehavior,
  30. ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior,
  31. String? restorationId,
  32. String? headerStyle,
  33. Clip? clipBehavior,
  34. bool? useSkeletonizer,
  35. Widget? header,
  36. Widget? footerLoadingIcon,
  37. List sort(
    1. dynamic items
    )?,
})

Implementation

NyPullToRefresh.grid(
    {Key? key,
    this.crossAxisCount = 2,
    this.mainAxisSpacing = 0,
    this.crossAxisSpacing = 0,
    this.onRefresh,
    this.beforeRefresh,
    this.afterRefresh,
    required this.data,
    this.transform,
    required this.child,
    this.empty,
    this.loading,
    this.stateName,
    this.scrollDirection,
    this.reverse,
    this.controller,
    this.primary,
    this.physics,
    this.shrinkWrap,
    this.padding = EdgeInsets.zero,
    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.headerStyle,
    this.clipBehavior,
    this.useSkeletonizer,
    this.header,
    this.footerLoadingIcon,
    this.sort})
    : kind = "grid",
      separatorBuilder = null,
      super(key: key);