toList

inline suspend fun <T> SharedFlow<T>.toList(destination: MutableList<T>): Nothing(source)

A specialized version of Flow.toList that returns Nothing to indicate that SharedFlow collection never completes.


suspend fun <T> Flow<T>.toList(destination: MutableList<T> = ArrayList()): List<T>(source)

Collects given flow into a destination