toList

fun <T> Flow<T>.toList(): Flow<List<T>>

Collects all items of the upstream into a list.