1 min readJun 1, 2019
Kotlin’s analogy to BehaviorSubject
is currently knowns as ConflatedBroadcastChannel
and it can be represented as flow using asFlow()
extension function. However, we plan introduce a new class, tentatively to be named StateFlow
, that is going to be specifically targeted to addressing this use-case and will directly implement Flow
interfaces. See this discussion for details: https://github.com/Kotlin/kotlinx.coroutines/issues/1082