ScrollSnapList constructor
ScrollSnapList({
- Color? background,
- required Widget itemBuilder(),
- ScrollController? listController,
- Curve curve = Curves.ease,
- bool allowAnotherDirection = true,
- int duration = 500,
- double? endOfListTolerance,
- bool focusOnItemTap = true,
- void focusToItem()?,
- required int itemCount,
- required double itemSize,
- Key? key,
- Key? listViewKey,
- EdgeInsetsGeometry? margin,
- required void onItemFocus(),
- Function? onReachEnd,
- EdgeInsetsGeometry? padding,
- bool reverse = false,
- bool? updateOnScroll,
- double? initialIndex,
- Axis scrollDirection = Axis.horizontal,
- bool dynamicItemSize = false,
- double dynamicSizeEquation(
- double distance
- double? dynamicItemOpacity,
- SelectedItemAnchor selectedItemAnchor = SelectedItemAnchor.MIDDLE,
- bool shrinkWrap = false,
- ScrollPhysics? scrollPhysics,
- Clip clipBehavior = Clip.hardEdge,
- ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
- bool dispatchScrollNotifications = false,
- EdgeInsetsGeometry? listViewPadding,
Implementation
ScrollSnapList(
{this.background,
required this.itemBuilder,
ScrollController? listController,
this.curve = Curves.ease,
this.allowAnotherDirection = true,
this.duration = 500,
this.endOfListTolerance,
this.focusOnItemTap = true,
this.focusToItem,
required this.itemCount,
required this.itemSize,
this.key,
this.listViewKey,
this.margin,
required this.onItemFocus,
this.onReachEnd,
this.padding,
this.reverse = false,
this.updateOnScroll,
this.initialIndex,
this.scrollDirection = Axis.horizontal,
this.dynamicItemSize = false,
this.dynamicSizeEquation,
this.dynamicItemOpacity,
this.selectedItemAnchor = SelectedItemAnchor.MIDDLE,
this.shrinkWrap = false,
this.scrollPhysics,
this.clipBehavior = Clip.hardEdge,
this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
this.dispatchScrollNotifications = false,
this.listViewPadding})
: listController = listController ?? ScrollController(),
super(key: key);