ExtendedImageGesturePageView.builder constructor

ExtendedImageGesturePageView.builder({
  1. Key? key,
  2. Axis scrollDirection = Axis.horizontal,
  3. bool reverse = false,
  4. PageController? controller,
  5. ScrollPhysics? physics,
  6. bool pageSnapping = true,
  7. ValueChanged<int>? onPageChanged,
  8. required IndexedWidgetBuilder itemBuilder,
  9. int? itemCount,
  10. CanMovePage? canMovePage,
  11. CanScrollPage? canScrollPage,
})

Creates a scrollable list that works page by page using widgets that are created on demand.

This constructor is appropriate for page views with a large (or infinite) number of children because the builder is called only for those children that are actually visible.

Providing a non-null itemCount lets the PageView compute the maximum scroll extent.

itemBuilder will be called only with indices greater than or equal to zero and less than itemCount.

Implementation

ExtendedImageGesturePageView.builder({
  Key? key,
  this.scrollDirection = Axis.horizontal,
  this.reverse = false,
  PageController? controller,
  ScrollPhysics? physics,
  this.pageSnapping = true,
  this.onPageChanged,
  required IndexedWidgetBuilder itemBuilder,
  int? itemCount,
  CanMovePage? canMovePage,
  CanScrollPage? canScrollPage,
})  : controller = controller ?? _defaultPageController,
      childrenDelegate =
          SliverChildBuilderDelegate(itemBuilder, childCount: itemCount),
      physics = physics != null
          ? _defaultScrollPhysics.applyTo(physics)
          : _defaultScrollPhysics,
      canMovePage = canMovePage ?? _defaultCanMovePage,
      canScrollPage = canScrollPage ?? _defaultCanScrollPage,
      super(key: key);