NyListView<T>.separated constructor

const NyListView<T>.separated({
  1. Key? key,
  2. required dynamic data(),
  3. dynamic transform(
    1. List<T> data
    )?,
  4. Function? child,
  5. NyChildBuilder<T>? childTyped,
  6. NyChildBuilderWithIndex<T>? childTypedWithIndex,
  7. NyChildBuilderWithHelper<T>? childTypedWithHelper,
  8. required IndexedWidgetBuilder? separatorBuilder,
  9. Widget? empty,
  10. LoadingStyle? loadingStyle,
  11. String? stateName,
  12. Axis? scrollDirection,
  13. bool? reverse,
  14. ScrollController? controller,
  15. bool? primary,
  16. ScrollPhysics? physics,
  17. bool? shrinkWrap,
  18. EdgeInsets? padding,
  19. double? itemExtent,
  20. Widget? prototypeItem,
  21. ChildIndexGetter? findChildIndexCallback,
  22. bool addAutomaticKeepAlives = true,
  23. bool addRepaintBoundaries = true,
  24. bool addSemanticIndexes = true,
  25. double? cacheExtent,
  26. int? semanticChildCount,
  27. DragStartBehavior? dragStartBehavior,
  28. ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior,
  29. String? restorationId,
  30. Clip? clipBehavior,
  31. Widget? header,
  32. dynamic sort(
    1. List<T> items
    )?,
})

Implementation

const NyListView.separated({
  super.key,
  required this.data,
  this.transform,
  this.child,
  this.childTyped,
  this.childTypedWithIndex,
  this.childTypedWithHelper,
  required this.separatorBuilder,
  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 = "separated",
      crossAxisCount = null,
      mainAxisSpacing = null,
      crossAxisSpacing = null;