Hi everyone. I have a `MutableStateFlow` and I nee...
# flow
Hi everyone. I have a
and I need to know when collectors subscribe/unsubscribe to/from this flow. I see the
fun SharedFlow<T>.onSubscription
extension which invokes the callback when the flow starts to be collected but I can’t find any extension function to know when a collector cancels the subscription. I’m basically looking for the equivalent of RxJava doOnSubscribe and doOnDispose. Does anyone know if there is a way to know when a collector cancels its subscription?
looks like what I’m looking for is the
extension function…
👌 1
IMHO i dont think flow can be
except cancel the subscribe coroutine, correct me if i'm wrong