CubePageView.builder constructor

CubePageView.builder(
  1. {Key key,
  2. @required int itemCount,
  3. @required CubeWidgetBuilder itemBuilder,
  4. ValueChanged<int> onPageChanged,
  5. PageController controller}
)

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

This constructor is appropriate if you want to customize the behavior

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

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

Implementation

CubePageView.builder({
  Key key,
  @required this.itemCount,
  @required this.itemBuilder,
  this.onPageChanged,
  this.controller,
})  : this.children = null,
      assert(itemCount != null),
      assert(itemBuilder != null),
      super(key: key);