MutableStateEmitterExtension<T> extension

Convenience methods for MutableStateEmitter.

on

Methods

asStateEmitter() StateEmitter<T>

Available on MutableStateEmitter<T>, provided by the MutableStateEmitterExtension extension

Returns a read-only view of this emitter.
getAndUpdate(T updater(T current)) → T

Available on MutableStateEmitter<T>, provided by the MutableStateEmitterExtension extension

Applies the updater function to the current value, sets the result, and returns the previous value.
update(T updater(T current)) → void

Available on MutableStateEmitter<T>, provided by the MutableStateEmitterExtension extension

Applies the updater function to the current value and sets the result.
updateAndGet(T updater(T current)) → T

Available on MutableStateEmitter<T>, provided by the MutableStateEmitterExtension extension

Applies the updater function to the current value, sets the result, and returns the new value.