NyListView<T>.grid constructor

const NyListView<T>.grid({
  1. Key? key,
  2. int? crossAxisCount = 2,
  3. double? mainAxisSpacing = 1.0,
  4. double? crossAxisSpacing = 1.0,
  5. Function? child,
  6. NyChildBuilder<T>? childTyped,
  7. NyChildBuilderWithIndex<T>? childTypedWithIndex,
  8. NyChildBuilderWithHelper<T>? childTypedWithHelper,
  9. required dynamic data(),
  10. dynamic transform(
    1. List<T> 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,
  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. Clip? clipBehavior,
  33. Widget? header,
  34. dynamic sort(
    1. List<T> items
    )?,
})

Implementation

const NyListView.grid({
  super.key,
  this.crossAxisCount = 2,
  this.mainAxisSpacing = 1.0,
  this.crossAxisSpacing = 1.0,
  this.child,
  this.childTyped,
  this.childTypedWithIndex,
  this.childTypedWithHelper,
  required this.data,
  this.transform,
  this.empty,
  this.loadingStyle,
  this.stateName,
  this.scrollDirection,
  this.reverse,
  this.controller,
  this.primary,
  this.physics,
  this.shrinkWrap,
  this.padding,
  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.clipBehavior,
  this.header,
  this.sort,
})  : assert(
          (child != null ? 1 : 0) +
                  (childTyped != null ? 1 : 0) +
                  (childTypedWithIndex != null ? 1 : 0) +
                  (childTypedWithHelper != null ? 1 : 0) ==
              1,
          'Exactly one child builder must be provided'),
      kind = "grid",
      separatorBuilder = null;