Hello everyone, so is it possible to access a susp...
# android
b
Hello everyone, so is it possible to access a suspend function value inside another non suspend function. I want to access data store value but its return value is a flow. Is there any way I can do this?
r
Any reasons for using
runBlocking
? Have you tried collecting the flow somewhere, so your non suspend function can be called when there is a value emitted?
m
Yes you can. you can use coroutines, launch a coroutine inside your non-suspend function and call your suspend function. I suggest you read about it. https://developer.android.com/kotlin/coroutines