ScrollablePositionedList.separated constructor

const ScrollablePositionedList.separated({
  1. Key? key,
  2. required int itemCount,
  3. required IndexedWidgetBuilder itemBuilder,
  4. ChildIndexGetter? findChildIndexCallback,
  5. required IndexedWidgetBuilder separatorBuilder,
  6. ItemScrollController? itemScrollController,
  7. bool shrinkWrap = false,
  8. ItemPositionsListener? itemPositionsListener,
  9. bool notifyPositionsOnRebuild = true,
  10. ScrollOffsetController? scrollOffsetController,
  11. ScrollOffsetListener? scrollOffsetListener,
  12. int initialScrollIndex = 0,
  13. double initialAlignment = 0,
  14. double initialOffset = 0,
  15. TargetRectResolver? initialTargetRectResolver,
  16. Axis scrollDirection = Axis.vertical,
  17. bool reverse = false,
  18. ScrollPhysics? physics,
  19. int? semanticChildCount,
  20. EdgeInsets? padding,
  21. bool addSemanticIndexes = true,
  22. bool addAutomaticKeepAlives = true,
  23. bool addRepaintBoundaries = true,
  24. double? minCacheExtent,
  25. double cacheExtentScreens = _defaultCacheExtentScreens,
  26. bool jumpToDistantItems = false,
  27. ScrollController? scrollController,
  28. ListController? listController,
  29. ItemExtentEstimator? estimateExtent,
  30. Object? estimationKey,
  31. CrossAxisLayoutKey? crossAxisLayoutKey,
  32. double estimatedSeparatorExtent = 0,
  33. bool restorePosition = false,
  34. OverscrollToTarget overscrollToTarget = OverscrollToTarget.matchScrollablePositionedList,
})

Creates a list whose items are built by itemBuilder, with a separator built by separatorBuilder between consecutive items.

Implementation

const ScrollablePositionedList.separated({
  super.key,
  required this.itemCount,
  required this.itemBuilder,
  this.findChildIndexCallback,
  required IndexedWidgetBuilder this.separatorBuilder,
  this.itemScrollController,
  this.shrinkWrap = false,
  this.itemPositionsListener,
  this.notifyPositionsOnRebuild = true,
  this.scrollOffsetController,
  this.scrollOffsetListener,
  this.initialScrollIndex = 0,
  this.initialAlignment = 0,
  this.initialOffset = 0,
  this.initialTargetRectResolver,
  this.scrollDirection = Axis.vertical,
  this.reverse = false,
  this.physics,
  this.semanticChildCount,
  this.padding,
  this.addSemanticIndexes = true,
  this.addAutomaticKeepAlives = true,
  this.addRepaintBoundaries = true,
  this.minCacheExtent,
  this.cacheExtentScreens = _defaultCacheExtentScreens,
  this.jumpToDistantItems = false,
  this.scrollController,
  this.listController,
  this.estimateExtent,
  this.estimationKey,
  this.crossAxisLayoutKey,
  this.estimatedSeparatorExtent = 0,
  this.restorePosition = false,
  this.overscrollToTarget = OverscrollToTarget.matchScrollablePositionedList,
}) : assert(cacheExtentScreens >= 0);