CNSegmentedControl constructor

const CNSegmentedControl({
  1. Key? key,
  2. required List<String> labels,
  3. required int selectedIndex,
  4. required ValueChanged<int> onValueChanged,
  5. bool enabled = true,
  6. Color? color,
  7. double height = 32.0,
  8. bool shrinkWrap = false,
  9. List<CNSymbol>? sfSymbols,
  10. double? iconSize,
  11. Color? iconColor,
  12. List<Color>? iconPaletteColors,
  13. bool? iconGradientEnabled,
  14. CNSymbolRenderingMode? iconRenderingMode,
})

Creates a Cupertino-native segmented control.

Implementation

const CNSegmentedControl({
  super.key,
  required this.labels,
  required this.selectedIndex,
  required this.onValueChanged,
  this.enabled = true,
  this.color,
  this.height = 32.0,
  this.shrinkWrap = false,
  this.sfSymbols,
  this.iconSize,
  this.iconColor,
  this.iconPaletteColors,
  this.iconGradientEnabled,
  this.iconRenderingMode,
});