TabPage constructor
TabPage({})
Implementation
TabPage({
super.key,
required List<Widget> children,
ValueCallback<int>? onPageChanged,
super.controller,
bool enableScroll = true,
}) : super(
autoPlay: false,
pauseAutoPlayOnTouch: false,
enableInfiniteScroll: false,
pageSnapping: true,
height: double.infinity,
scrollPhysics: enableScroll
? const ClampingScrollPhysics()
: const NeverScrollableScrollPhysics(),
onPageChanged: (int? index, CarouselPageChangedReason reason) {
if (index != null) onPageChanged?.call(index);
},
itemCount: children.length,
itemBuilder: (_, int index, __) => children[index]);