ScrollablePositionedList constructor

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

Implementation

const ScrollablePositionedList({
  super.key,
  required this.itemCount,
  required this.itemBuilder,
  this.findChildIndexCallback,
  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.restorePosition = false,
  this.overscrollToTarget = OverscrollToTarget.matchScrollablePositionedList,
}) : assert(cacheExtentScreens >= 0),
     separatorBuilder = null,
     estimatedSeparatorExtent = 0;