ScrollablePositionedList.builder constructor
const
ScrollablePositionedList.builder({
- required int itemCount,
- required IndexedWidgetBuilder itemBuilder,
- Key? key,
- ItemScrollController? itemScrollController,
- bool shrinkWrap = false,
- ItemPositionsListener? itemPositionsListener,
- ScrollOffsetController? scrollOffsetController,
- ScrollOffsetListener? scrollOffsetListener,
- int initialScrollIndex = 0,
- double initialAlignment = 0,
- Axis scrollDirection = Axis.vertical,
- bool reverse = false,
- ScrollPhysics? physics,
- int? semanticChildCount,
- EdgeInsets? padding,
- bool addSemanticIndexes = true,
- bool addAutomaticKeepAlives = true,
- bool addRepaintBoundaries = true,
- double? minCacheExtent,
- ScrollController? scrollController,
- dynamic onScrollEnd(
- bool isBottomReached
- required dynamic onScroll(
- ScrollPosition scrollPosition
Create a ScrollablePositionedList whose items are provided by
itemBuilder
.
Implementation
const ScrollablePositionedList. builder({
required this.itemCount,
required this.itemBuilder,
Key? key,
this.itemScrollController,
this.shrinkWrap = false,
ItemPositionsListener? itemPositionsListener,
this.scrollOffsetController,
ScrollOffsetListener? scrollOffsetListener,
this.initialScrollIndex = 0,
this.initialAlignment = 0,
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.scrollController,
this.onScrollEnd, required this.onScroll,
})
: assert(itemBuilder != null),
itemPositionsNotifier = itemPositionsListener as ItemPositionsNotifier?,
scrollOffsetNotifier = scrollOffsetListener as ScrollOffsetNotifier?,
separatorBuilder = null,
super(key: key);