Untitled
unknown
plain_text
3 years ago
336 B
3
Indexable
fun CustomSwitch() {
val checked = remember { mutableStateOf(true) }
Column {
Switch(
checked = checked.value,
onCheckedChange = { checked.value = it }
)
if (checked.value) {
Text("Switch is On")
} else {
Text("Switch is Off")
}
}
}Editor is loading...