loloof64
04/14/2021, 1:32 PM@Composable
named NonInteractiveZone
which has some process running or not based on a Boolean
state (let's say shouldBeRunning
). I would like to let other @Composable
call some "methods/events" on it, let's say startProcess()
and endProcess()
. So that I could call myNonInteractiveZone.startProcess()
. Can I achieve something like that with a @Composable
? More in the thread.loloof64
04/14/2021, 1:33 PMNonInteractiveZone
:
fun startProcess() {
shouldBeRunning = true
}
fun stopProcess() {
shouldBeRunning = false
}
Both methods are already implemented, and are not simple callbacks.loloof64
04/14/2021, 1:38 PM@Composable
are just simple functions)loloof64
04/14/2021, 1:46 PMshouldBeRunning
state, and remove startProcess()
and stopProcess()
. But rather change this shouldBeRunning
from the most common ancestor.Zach Klippenstein (he/him) [MOD]
04/14/2021, 2:20 PM