PreloadPageView constructor
PreloadPageView({
- Key? key,
- Axis scrollDirection = Axis.horizontal,
- bool reverse = false,
- PreloadPageController? controller,
- ScrollPhysics? physics,
- bool pageSnapping = true,
- ValueChanged<
int> ? onPageChanged, - List<
Widget> children = const <Widget>[], - int preloadPagesCount = 1,
Creates a scrollable list that works page by page from an explicit List of widgets.
This constructor is appropriate for page views with a small number of children because constructing the List requires doing work for every child that could possibly be displayed in the page view, instead of just those children that are actually visible.
Implementation
PreloadPageView({
super.key,
this.scrollDirection = Axis.horizontal,
this.reverse = false,
PreloadPageController? controller,
this.physics,
this.pageSnapping = true,
this.onPageChanged,
List<Widget> children = const <Widget>[],
this.preloadPagesCount = 1,
}) : controller = controller ?? _defaultPageController,
childrenDelegate = SliverChildListDelegate(children);