collect

suspend fun collect(collector: FlowCollector<T>)(source)

Calls SharedFlow.collect on the underlying flow. This way the collector receives all events. Note that the thread and / or CoroutineScope you call this in decides on which thread you handle the events.

This function never completes, read the official collect docs for more info.