MBegemot
09/09/2020, 9:34 AMRow(Modifier.padding(5.dp)) {
Text("Selected")
//Switch(checked = lselected, onCheckedChange = { lselected = !lselected} )
Checkbox(checked = lselected, onCheckedChange = { lselected = !lselected} )
Text("Unselected")
}
Yann Badoual
09/09/2020, 9:39 AMlselected
too please?matvei
09/09/2020, 11:05 AMonCheckChange
after initial composition with the same value that you set in the Switch.
For what it worth, the more correct handling of the callback would be onCheckedChange = { lselected = it }
as switch already gives you the hint about to which state it wants to changematvei
09/09/2020, 11:06 AMMBegemot
09/09/2020, 11:34 AMmatvei
09/09/2020, 12:20 PMMBegemot
09/09/2020, 12:25 PMmatvei
09/09/2020, 12:42 PM