ScrollablePositionedList.builder constructor

const ScrollablePositionedList.builder({
  1. required int itemCount,
  2. required IndexedWidgetBuilder itemBuilder,
  3. Key? key,
  4. ItemScrollController? itemScrollController,
  5. bool shrinkWrap = false,
  6. ItemPositionsListener? itemPositionsListener,
  7. ScrollOffsetController? scrollOffsetController,
  8. ScrollOffsetListener? scrollOffsetListener,
  9. int initialScrollIndex = 0,
  10. double initialAlignment = 0,
  11. Axis scrollDirection = Axis.vertical,
  12. bool reverse = false,
  13. ScrollPhysics? physics,
  14. int? semanticChildCount,
  15. EdgeInsets? padding,
  16. bool addSemanticIndexes = true,
  17. bool addAutomaticKeepAlives = true,
  18. bool addRepaintBoundaries = true,
  19. double? minCacheExtent,
  20. ScrollController? scrollController,
  21. dynamic onScrollEnd(
    1. bool isBottomReached
    )?,
  22. required dynamic onScroll(
    1. 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);