SuperListView.builder constructor

SuperListView.builder({
  1. Key? key,
  2. Axis scrollDirection = Axis.vertical,
  3. bool reverse = false,
  4. ScrollController? controller,
  5. bool? primary,
  6. ScrollPhysics? physics,
  7. bool shrinkWrap = false,
  8. EdgeInsetsGeometry? padding,
  9. required NullableIndexedWidgetBuilder itemBuilder,
  10. ChildIndexGetter? findChildIndexCallback,
  11. int? itemCount,
  12. bool addAutomaticKeepAlives = true,
  13. bool addRepaintBoundaries = true,
  14. bool addSemanticIndexes = true,
  15. double? cacheExtent,
  16. int? semanticChildCount,
  17. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  18. ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior,
  19. String? restorationId,
  20. Clip clipBehavior = Clip.hardEdge,
  21. ListController? listController,
  22. ExtentEstimationProvider? extentEstimation,
  23. ExtentPrecalculationPolicy? extentPrecalculationPolicy,
  24. bool delayPopulatingCacheArea = false,
})

Creates a new SuperListView that builds its children dynamically.

See ListView.builder for details.

Implementation

SuperListView.builder({
  super.key,
  super.scrollDirection,
  super.reverse,
  super.controller,
  super.primary,
  super.physics,
  super.shrinkWrap,
  super.padding,
  required NullableIndexedWidgetBuilder itemBuilder,
  ChildIndexGetter? findChildIndexCallback,
  int? itemCount,
  bool addAutomaticKeepAlives = true,
  bool addRepaintBoundaries = true,
  bool addSemanticIndexes = true,
  super.cacheExtent,
  int? semanticChildCount,
  super.dragStartBehavior,
  super.keyboardDismissBehavior,
  super.restorationId,
  super.clipBehavior,
  this.listController,
  this.extentEstimation,
  this.extentPrecalculationPolicy,
  this.delayPopulatingCacheArea = false,
})  : assert(itemCount == null || itemCount >= 0),
      assert(semanticChildCount == null || semanticChildCount <= itemCount!),
      childrenDelegate = SliverChildBuilderDelegate(
        itemBuilder,
        findChildIndexCallback: findChildIndexCallback,
        childCount: itemCount,
        addAutomaticKeepAlives: addAutomaticKeepAlives,
        addRepaintBoundaries: addRepaintBoundaries,
        addSemanticIndexes: addSemanticIndexes,
      ),
      super(
        semanticChildCount: semanticChildCount ?? itemCount,
      );