How do you collect a flow once in a non-blocking w...
# flow
s
How do you collect a flow once in a non-blocking way, so it doesn't update when the flow updates?
m
Are you looking for the suspend function
first()
?
n
Or maybe `StateFlow`/`stateIn` where you can just get the latest value?
s
I think
toCollection()
accomplishes what I want?
n
Yeah if you want all the items at once when the Flow finishes