CNSegmentedControl constructor
const
CNSegmentedControl({
- Key? key,
- required List<
String> labels, - required int selectedIndex,
- required ValueChanged<
int> onValueChanged, - bool enabled = true,
- Color? color,
- double height = 32.0,
- bool shrinkWrap = false,
- List<
CNSymbol> ? sfSymbols, - double? iconSize,
- Color? iconColor,
- List<
Color> ? iconPaletteColors, - bool? iconGradientEnabled,
- CNSymbolRenderingMode? iconRenderingMode,
- bool autoHideOnModal = true,
- String? semanticLabel,
- String? labelFontFamily,
- double? labelFontSize,
- FontWeight? labelFontWeight,
- Color? labelColor,
- String? selectedLabelFontFamily,
- FontWeight? selectedLabelFontWeight,
- Color? selectedLabelColor,
- 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,
});