SnappingListView.builder constructor
SnappingListView.builder({
- Axis? scrollDirection,
- required Builder itemBuilder,
- int? itemCount,
- required double itemExtent,
- ValueChanged<
int> ? onItemChanged, - EdgeInsets padding = const EdgeInsets.only(top: 0),
- required double maxExtent,
builder for snapping effect list with two static sizes
scrollDirection
scroll direction for list horizontal or isVertical
itemExtent
not selected item size required to calculate animations
maxExtent
selected item size required to calculate animations
onItemChanged
caled when snapped to item
padding
default padding for list
itemBuilder
builder function for each item
Implementation
SnappingListView.builder(
{this.scrollDirection,
required this.itemBuilder,
this.itemCount,
required this.itemExtent,
this.onItemChanged,
this.padding = const EdgeInsets.only(top: 0),
required this.maxExtent})
: assert(itemExtent > 0),
assert(maxExtent > 0),
assert(maxExtent >= itemExtent);