Single choice
Exactly one segment is selected at a time.
val options = listOf("Day", "Week", "Month")
var selectedIndex by remember { mutableStateOf(0) }
SingleChoiceSegmentedButtonRow {
options.forEachIndexed { index, label ->
SegmentedButton(
selected = index == selectedIndex,
onClick = { selectedIndex = index },
shape = SegmentedButtonDefaults.itemShape(index, options.size)
) { Text(label) }
}
}