NyPullToRefresh<T>.grid constructor

const 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 dynamic 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. LoadingStyle? loadingStyle,
  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. Widget? header,
  35. Widget? footerLoadingIcon,
  36. List sort(
    1. dynamic items
    )?,
})

Implementation

const NyPullToRefresh.grid(
    {super.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.loadingStyle,
    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.header,
    this.footerLoadingIcon,
    this.sort})
    : kind = "grid",
      separatorBuilder = null;