Flow is not collected in Composable
Im creating a Flow inside my repository which fetches data from an sse api
override fun getStrean() = flow {
try {
val response = api.getStream()
while (true) {
//do something with response
emit(result)
}
} catch (e: HttpException) {
..
}
}
It get forwarded into my composable where the viewmodel gets injected
@Composable
fun PageWohnzimmer(
viewmodel: myviewmodel = hiltViewModel()
)
The flow then gets collected like...