TitledPageView constructor

TitledPageView({Key key, bool reverse: false, bool pageSnapping: true, bool fadeEffect: true, bool controlButtons: true, PageController controller, ScrollPhysics physics, ValueChanged<int> onPageChanged, List<Widget> titleChildren: const [], List<Widget> children: const [] })

Takes two List's and constructs the title and the body from them.

The lists are both directly wrapped in IndexedWidgetBuilder. Since every Widget in the list must be explicitly created, consider using this constructor only for small lists. titleChildren and children do not need to have the same number of elements, but consequently the title and the body will not be synchronised after enough page flips.

Implementation

TitledPageView({
	Key key,
	this.reverse = false,
	this.pageSnapping = true,
	this.fadeEffect = true,
	this.controlButtons = true,
	PageController controller,
	this.physics,
	this.onPageChanged,
	List<Widget> titleChildren = const [],
	List<Widget> children = const [],
}) : controller = controller ?? PageController(),
		titleBuilder =
			((BuildContext context, int index) => titleChildren[index % titleChildren.length]),
		bodyBuilder =
			((BuildContext context, int index) => children[index % titleChildren.length]);