Gilles Barbier
02/05/2021, 7:56 PMMutableSharedFlow
with a collect lambda.
val responseFlow = MutableSharedFlow<Message>(replay = 0)
...
responseFlow.collect {
...
}
When I collect a message, I do a test and for some value , I would like to leave the collect function and return a value. I'm not sure how to do that. Any idea?wasyl
02/05/2021, 8:00 PMflow.first { condition }
for exampleGilles Barbier
02/05/2021, 8:01 PM