toList

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

Collects given flow into a destination