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. ScrollOffsetListener? scrollOffsetListener,
  8. int initialScrollIndex = 0,
  9. double initialAlignment = 0,
  10. Axis scrollDirection = Axis.vertical,
  11. bool reverse = false,
  12. ScrollPhysics? physics,
  13. int? semanticChildCount,
  14. EdgeInsets? padding,
  15. bool addSemanticIndexes = true,
  16. bool addAutomaticKeepAlives = true,
  17. bool addRepaintBoundaries = true,
  18. double? minCacheExtent,
})

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,
  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,
})  : assert(itemCount != null),
      assert(itemBuilder != null),
      itemPositionsNotifier = itemPositionsListener as ItemPositionsNotifier?,
      scrollOffsetNotifier = scrollOffsetListener as ScrollOffsetNotifier?,
      separatorBuilder = null,
      super(key: key);