How do I set the flow to start collecting only whe...
# coroutines
s
How do I set the flow to start collecting only when the data meet certain conditions. For example:
Copy code
flowOf(1, 2, 3, 2, 1, 2, 3)
    .startCollectWhen { it == 3 }
    .collect { print(it) }

// Result: 3, 2, 1, 2, 3
d
flow.dropWhile { it != 3 }
❤️ 1