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,
  15. bool autoHideOnModal = true,
  16. String? semanticLabel,
  17. String? labelFontFamily,
  18. double? labelFontSize,
  19. FontWeight? labelFontWeight,
  20. Color? labelColor,
  21. String? selectedLabelFontFamily,
  22. FontWeight? selectedLabelFontWeight,
  23. Color? selectedLabelColor,
  24. TextDirection? textDirection,
})

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,
  this.autoHideOnModal = true,
  this.semanticLabel,
  this.labelFontFamily,
  this.labelFontSize,
  this.labelFontWeight,
  this.labelColor,
  this.selectedLabelFontFamily,
  this.selectedLabelFontWeight,
  this.selectedLabelColor,
  this.textDirection,
});