Hi :wave: > Not stable for inheritance > *`S...
# flow
p
Hi đź‘‹
Not stable for inheritance
StateFlow
interface is not stable for inheritance in 3rd party libraries
, as new methods might be added to this interface in the future, but is stable for use. Use
MutableStateFlow()
constructor function to create an implementation.
Question: I am writing a library. Internally I use a
MutableStateFlow
. I don’t expose it directly but I expose is as a
Flow<T>
. Also, I am using the constructor. I don’t implement the interface itself. 1. Does this mean that I don’t need to worry about this warning? 2. Does this mean that ``@ExperimentalCoroutinesApi`` in that class doesn’t need to worry me? Source: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-state-flow/index.html