ScrollablePositionedList.separated constructor

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

Create a ScrollablePositionedList whose items are provided by itemBuilder and separators provided by separatorBuilder.

Implementation

const ScrollablePositionedList.separated({
  required this.itemCount,
  required this.itemBuilder,
  required this.separatorBuilder,
  Key? key,
  this.shrinkWrap = false,
  this.itemScrollController,
  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),
      assert(separatorBuilder != null),
      itemPositionsNotifier = itemPositionsListener as ItemPositionsNotifier?,
      scrollOffsetNotifier = scrollOffsetListener as ScrollOffsetNotifier?,
      super(key: key);