Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
336 B
0
Indexable
Never
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")
        }
    }
}