Skip to content Skip to sidebar Skip to footer

Kotlin Mutablestateflow.collect Is Dropping Values

I have an android app in which I'm trying to use coroutine flows to replace the existing Otto EventBus using my own event bus library. I'm seeing dropped values when setting the Mu

Solution 1:

StateFlow official documentation states:

The value of mutable state flow can be updated by setting its value property. Updates to the value are always conflated. So a slow collector skips fast updates, but always collects the most recently emitted value.

You can find StateFlow official documentation here.

Post a Comment for "Kotlin Mutablestateflow.collect Is Dropping Values"