Loney Chou
11/16/2022, 12:17 AMState.getValue and MutableState.setValue ?jw
11/16/2022, 12:19 AMby and read/write to the value propertyLoney Chou
11/16/2022, 10:01 AMjames
11/16/2022, 11:31 AMinput
instead of using:
var input by remember { mutableStateOf(…) }
and directly reading/writing to input
you could have:
val input = remember { mutableStateOf(…) }
and you could read and write to input.valueLoney Chou
11/16/2022, 1:26 PMinterface State<T> {
val value: T
operator fun getValue(/* ... */): T = value
}
'Cause sometimes IDEA just doesn't recognise when you by something, and you need to manually import them.