PositionedList constructor
const
PositionedList({
- Key? key,
- required int itemCount,
- required IndexedWidgetBuilder itemBuilder,
- IndexedWidgetBuilder? separatorBuilder,
- ScrollController? controller,
- ItemPositionsNotifier? itemPositionsNotifier,
- int positionedIndex = 0,
- double alignment = 0,
- Axis scrollDirection = Axis.vertical,
- bool reverse = false,
- ScrollPhysics? physics,
- EdgeInsets? padding,
- double? cacheExtent,
- int? semanticChildCount,
- ChildIndexGetter? findChildIndexCallback,
- bool addSemanticIndexes = true,
- bool addRepaintBoundaries = true,
- bool addAutomaticKeepAlives = true,
- 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);