SectionSwitcher constructor
const
SectionSwitcher({
- Key? key,
- required List<
NavigationItem> items, - SectionSwitcherController? controller,
- int initialIndex = 0,
- double segmentedHeight = 40.0,
- double segmentedItemSpacing = 4.0,
- EdgeInsets contentPadding = EdgeInsets.zero,
- EdgeInsets segmentedMargin = EdgeInsets.zero,
- SegmentedControlStyle? segmentedControlStyle,
- Duration duration = const Duration(milliseconds: 300),
- Curve curve = Curves.easeInOut,
- ValueChanged<
int> ? onPageChanged,
Implementation
const SectionSwitcher({
super.key,
required this.items,
this.controller,
this.initialIndex = 0,
this.segmentedHeight = 40.0,
this.segmentedItemSpacing = 4.0,
this.contentPadding = EdgeInsets.zero,
this.segmentedMargin = EdgeInsets.zero,
this.segmentedControlStyle,
this.duration = const Duration(milliseconds: 300),
this.curve = Curves.easeInOut,
this.onPageChanged,
}) : assert(items.length > 0, 'At least one item is required.');