TransformerPageView constructor
TransformerPageView({
- Key? key,
- int? index,
- Duration? duration,
- Curve curve = Curves.ease,
- double viewportFraction = 1.0,
- bool loop = false,
- Axis scrollDirection = Axis.horizontal,
- ScrollPhysics? physics,
- bool pageSnapping = true,
- ValueChanged<
int?> ? onPageChanged, - IndexController? controller,
- PageTransformer? transformer,
- IndexedWidgetBuilder? itemBuilder,
- TransformerPageController? pageController,
- required int itemCount,
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
TransformerPageView({
Key? key,
this.index,
Duration? duration,
this.curve: Curves.ease,
this.viewportFraction: 1.0,
this.loop: false,
this.scrollDirection = Axis.horizontal,
this.physics,
this.pageSnapping = true,
this.onPageChanged,
this.controller,
this.transformer,
this.itemBuilder,
this.pageController,
required this.itemCount,
}) : assert(itemCount == 0 || itemBuilder != null || transformer != null),
this.duration =
duration ?? new Duration(milliseconds: kDefaultTransactionDuration),
super(key: key);