ScrollablePositionedList.builder constructor
const
ScrollablePositionedList.builder({
- Key? key,
- required int itemCount,
- required IndexedWidgetBuilder itemBuilder,
- ChildIndexGetter? findChildIndexCallback,
- ItemScrollController? itemScrollController,
- bool shrinkWrap = false,
- ItemPositionsListener? itemPositionsListener,
- bool notifyPositionsOnRebuild = true,
- ScrollOffsetController? scrollOffsetController,
- ScrollOffsetListener? scrollOffsetListener,
- int initialScrollIndex = 0,
- double initialAlignment = 0,
- double initialOffset = 0,
- TargetRectResolver? initialTargetRectResolver,
- Axis scrollDirection = Axis.vertical,
- bool reverse = false,
- ScrollPhysics? physics,
- int? semanticChildCount,
- EdgeInsets? padding,
- bool addSemanticIndexes = true,
- bool addAutomaticKeepAlives = true,
- bool addRepaintBoundaries = true,
- double? minCacheExtent,
- double cacheExtentScreens = _defaultCacheExtentScreens,
- bool jumpToDistantItems = false,
- ScrollController? scrollController,
- ListController? listController,
- ItemExtentEstimator? estimateExtent,
- Object? estimationKey,
- CrossAxisLayoutKey? crossAxisLayoutKey,
- bool restorePosition = false,
- OverscrollToTarget overscrollToTarget = OverscrollToTarget.matchScrollablePositionedList,
Creates a list whose items are built by itemBuilder.
Implementation
const ScrollablePositionedList.builder({
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;