SingleChoiceSegmentedControl<T> constructor

const SingleChoiceSegmentedControl<T>({
  1. Key? key,
  2. required List<T> values,
  3. required List<String> labels,
  4. required List<IconData> icons,
  5. required T selected,
  6. void onSelectionChanged(
    1. Set<T>
    )?,
  7. Color backgroundColor = AppColors.blue,
})

Implementation

const SingleChoiceSegmentedControl({
  super.key,
  required this.values,
  required this.labels,
  required this.icons,
  required this.selected,
  this.onSelectionChanged,
  this.backgroundColor = AppColors.blue,
}) : assert(values.length == labels.length && labels.length == icons.length,
          'Values, labels, and icons lists must have the same length');