asFlow
Converts this Subscribable into a cold Flow.
Each call to Flow.collect triggers a new, independent subscription to this Subscribable. Emissions from the Subscribable are forwarded to the Flow collector on whatever thread the Subscribable emits on. Use kotlinx.coroutines.flow.flowOn downstream to switch the context in which collection occurs.
The subscription is disposed automatically when:
The Subscribable calls Observer.onComplete, which closes the flow normally, or
The collector's coroutine is canceled, which disposes the upstream subscription.