TabPage constructor

TabPage({
  1. Key? key,
  2. required List<Widget> children,
  3. ValueCallback<int>? onPageChanged,
  4. CarouselController? controller,
  5. bool enableScroll = true,
})

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]);