MutableLiveData

expect open class MutableLiveData<T> : LiveData<T>

The MutableLiveData is an extension of LiveData that can have its value changed.

Instances of MutableLiveData should remain as values within data sources and expose LiveData instances to ensure data cannot be externally modified.

MutableLiveData instances are not thread-safe and assume that all interaction occurs on a single thread.

actual open class MutableLiveData<T> : NLiveData<T>

Constructors

Link copied to clipboard
expect constructor()
constructor(value: T?, postman: Postman<T>?)
actual constructor()

Functions

Link copied to clipboard
expect fun postValue(value: T)

Post the value of the data on the next event loop cycle (if possible).

actual open override fun postValue(value: T)
Link copied to clipboard
expect fun setValue(value: T)

Set the value of the data.

actual open override fun setValue(value: T)