toSet

inline suspend fun <T> SharedFlow<T>.toSet(): Set<T>
suspend fun <T> Flow<T>.toSet(destination: MutableSet<T> = LinkedHashSet()): Set<T>

Collects given flow into a destination