SnappingListView.builder constructor

SnappingListView.builder({
  1. Axis? scrollDirection,
  2. required Builder itemBuilder,
  3. int? itemCount,
  4. required double itemExtent,
  5. ValueChanged<int>? onItemChanged,
  6. EdgeInsets padding = const EdgeInsets.only(top: 0),
  7. 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);