SwitchSample
@Sampled
@Composable
fun SwitchSample() {
val checkedState = remember { mutableStateOf(true) }
Switch(checked = checkedState.value, onCheckedChange = { checkedState.value = it })
}Material Design switch Switches toggle the state of a single item on or off.

CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Robomori
Run Android emulators and devices outside Android Studio.
@Sampled
@Composable
fun SwitchSample() {
val checkedState = remember { mutableStateOf(true) }
Switch(checked = checkedState.value, onCheckedChange = { checkedState.value = it })
}Content updated: