eirikb
10/13/2021, 3:31 PMColumn {
On("someting") {
Text("Updated $it!")
}
}
is what I'm aiming forAdam Powell
10/14/2021, 2:19 PMOn("something")
?eirikb
10/14/2021, 8:34 PMAdam Powell
10/15/2021, 1:15 PMOn("something")
happens instantaneously and is done. You can instead set a state variable when this event happens and show this text using something like if (myCondition)
eirikb
10/15/2021, 5:48 PMeirikb
10/15/2021, 5:52 PMOn
at a specific location. I've been digging in the Compose code and see it uses some cache to determine location of elements based on when the function block is called. It seems a bit hackish, but I haven't been able to hook into this and trigger a recomposeeirikb
10/15/2021, 6:05 PMOn
would accept a function block, just like normal Compose UI elements, and this block will be called when the "something" changesAdam Powell
10/16/2021, 1:24 AMcollectAsState
function and friends work the way they do for the same reasons coroutines return a value instead of passing them to a callbackeirikb
10/16/2021, 6:50 AM