SmoothSegmentedControl<T> constructor

const SmoothSegmentedControl<T>({
  1. required T currentValue,
  2. required List<String> labels,
  3. required ValueChanged<T> onValueChanged,
  4. required List<T> values,
  5. Color? backgroundColor,
  6. Color? selectedTextColor,
  7. Color? unselectedTextColor,
  8. Key? key,
})

Implementation

const SmoothSegmentedControl({
  required this.currentValue,
  required this.labels,
  required this.onValueChanged,
  required this.values,
  this.backgroundColor,
  this.selectedTextColor,
  this.unselectedTextColor,
  super.key,
}) : assert(
       labels.length == values.length,
       'Labels and values must have the same length',
     );