PreloadPageView constructor

  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. List<Widget> children = const <Widget>[],
  9. 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.


  Key key,
  this.scrollDirection = Axis.horizontal,
  this.reverse = false,
  PageController controller,
  this.pageSnapping = true,
  List<Widget> children = const <Widget>[],
  this.preloadPagesCount = 1,
})  : controller = controller ?? _defaultPageController,
      childrenDelegate = SliverChildListDelegate(children),
      super(key: key);