PositionedList constructor

const PositionedList({
  1. Key? key,
  2. required int itemCount,
  3. required IndexedWidgetBuilder itemBuilder,
  4. IndexedWidgetBuilder? separatorBuilder,
  5. ScrollController? controller,
  6. ItemPositionsNotifier? itemPositionsNotifier,
  7. int positionedIndex = 0,
  8. double alignment = 0,
  9. Axis scrollDirection = Axis.vertical,
  10. bool reverse = false,
  11. ScrollPhysics? physics,
  12. EdgeInsets? padding,
  13. double? cacheExtent,
  14. int? semanticChildCount,
  15. ChildIndexGetter? findChildIndexCallback,
  16. bool addSemanticIndexes = true,
  17. bool addRepaintBoundaries = true,
  18. bool addAutomaticKeepAlives = true,
  19. ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior,
})

Create a PositionedList.

Implementation

const PositionedList({
  Key? key,
  required this.itemCount,
  required this.itemBuilder,
  this.separatorBuilder,
  this.controller,
  this.itemPositionsNotifier,
  this.positionedIndex = 0,
  this.alignment = 0,
  this.scrollDirection = Axis.vertical,
  this.reverse = false,
  this.physics,
  this.padding,
  this.cacheExtent,
  this.semanticChildCount,
  this.findChildIndexCallback,
  this.addSemanticIndexes = true,
  this.addRepaintBoundaries = true,
  this.addAutomaticKeepAlives = true,
  this.keyboardDismissBehavior,
})  : assert((positionedIndex == 0) || (positionedIndex < itemCount),
          'positionedIndex cannot be 0 and must be smaller than itemCount'),
      super(key: key);