Michal Klimczak
08/30/2023, 10:03 AMval myState = rememberMyState{ result ->
//handle the result
}
//e.g. in button on click
myState.launch()
#2 coroutine
val scope = rememberCoroutineScope()
//e.g. in button on click
scope.launch {
val result = MyState().result() //launches external process and awaits its completion
//handle the result
}
I am kinda drawn to the second approach, even considering wrapping some higher-level rememberLauncherForActivityResult into it. Wdyt?