ScrollSnapList constructor

ScrollSnapList({
  1. Color? background,
  2. required Widget itemBuilder(
    1. BuildContext,
    2. int
    ),
  3. ScrollController? listController,
  4. Curve curve = Curves.ease,
  5. bool allowAnotherDirection = true,
  6. int duration = 500,
  7. double? endOfListTolerance,
  8. bool focusOnItemTap = true,
  9. void focusToItem(
    1. int
    )?,
  10. required int itemCount,
  11. required double itemSize,
  12. Key? key,
  13. Key? listViewKey,
  14. EdgeInsetsGeometry? margin,
  15. required void onItemFocus(
    1. int
    ),
  16. Function? onReachEnd,
  17. EdgeInsetsGeometry? padding,
  18. bool reverse = false,
  19. bool? updateOnScroll,
  20. double? initialIndex,
  21. Axis scrollDirection = Axis.horizontal,
  22. bool dynamicItemSize = false,
  23. double dynamicSizeEquation(
    1. double distance
    )?,
  24. double? dynamicItemOpacity,
  25. SelectedItemAnchor selectedItemAnchor = SelectedItemAnchor.MIDDLE,
  26. bool shrinkWrap = false,
  27. ScrollPhysics? scrollPhysics,
  28. Clip clipBehavior = Clip.hardEdge,
  29. ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
  30. bool dispatchScrollNotifications = false,
  31. 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);