androidx.compose.material3
MultiChoiceSegmentedButtonRow
Composable function
One of the rows and buttons. It works like SingleChoiceSegmentedButtonRow. Only the parameters that differ are described here.
A row where more than one button can be on at once.

val options = listOf("Walk", "Bike", "Car")
val checked = remember { mutableStateListOf(true, false, true) }
MultiChoiceSegmentedButtonRow {
options.forEachIndexed { index, label ->
SegmentedButton(
checked = checked[index],
onCheckedChange = { checked[index] = it },
shape = SegmentedButtonDefaults.itemShape(index = index, count = options.size),
) { Text(label) }
}
}
Parameters
@Composable
fun MultiChoiceSegmentedButtonRow(
modifier: Modifier = Modifier,
space: Dp = SegmentedButtonDefaults.BorderWidth,
content: @Composable MultiChoiceSegmentedButtonRowScope.() -> Unit,
)
content: @Composable MultiChoiceSegmentedButtonRowScope.() -> UnitRequired
content: @Composable MultiChoiceSegmentedButtonRowScope.() -> UnitRequiredThe buttons. Add one SegmentedButton per option.
Same as in SingleChoiceSegmentedButtonRow: modifier, space.
Rows and buttons
SingleChoiceSegmentedButtonRowMultiChoiceSegmentedButtonRowSegmentedButton