toSet

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

Collects given flow into a destination