SectionSwitcher constructor

const SectionSwitcher({
  1. Key? key,
  2. required List<NavigationItem> items,
  3. SectionSwitcherController? controller,
  4. int initialIndex = 0,
  5. double segmentedHeight = 40.0,
  6. double segmentedItemSpacing = 4.0,
  7. EdgeInsets contentPadding = EdgeInsets.zero,
  8. EdgeInsets segmentedMargin = EdgeInsets.zero,
  9. SegmentedControlStyle? segmentedControlStyle,
  10. Duration duration = const Duration(milliseconds: 300),
  11. Curve curve = Curves.easeInOut,
  12. 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.');