Is Kotlin Flow’s Collect is only internal kotlinx.coroutines API?

The answer is, NO, collect is not only internal kotlinx.coroutines API. The error message is misleading. As per @ir42’s comment, add import kotlinx.coroutines.flow.collect solve the problem. Additional info, why I didn’t pick collectLatest as the answer collect and collectLatest is different. Using this example fun simple(): Flow<Int> = flow { // flow builder for (i … Read more