MutableStateFlow
A mutable StateFlow that provides a setter for value. An instance of MutableStateFlow
with the given initial value
can be created using MutableStateFlow(value)
constructor function.
See the StateFlow documentation for details on state flows. Note that all emission-related operators, such as value's setter, emit, and tryEmit, are conflated using Any.equals.
Not stable for inheritance
The MutableStateFlow
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 the MutableStateFlow()
constructor function to create an implementation.
Properties
Functions
Represents this mutable state flow as a read-only state flow.
Updates the MutableStateFlow.value atomically using the specified function of its value, and returns its prior value.
Updates the MutableStateFlow.value atomically using the specified function of its value.
Updates the MutableStateFlow.value atomically using the specified function of its value, and returns the new value.