InMemoryStateFlowStore

class InMemoryStateFlowStore(val underlyingData: MutableMap<String, Any?> = mutableMapOf()) : StateFlowStore

A StateFlowStore that can be used for unit tests or non-Android parts of multiplatform projects.

Constructors

Link copied to clipboard
constructor(underlyingData: MutableMap<String, Any?> = mutableMapOf())

Properties

Link copied to clipboard

Optional underlying data which can be used to store and restore the whole state.

Functions

Link copied to clipboard
open operator override fun contains(key: String): Boolean
Link copied to clipboard
open override fun <T> getData(key: String, default: T): MutableStateFlow<T>
fun <T> getData(key: String, default: T, setter: (value: T) -> Unit?): MutableStateFlow<T>
Link copied to clipboard
fun <T> StateFlowStore.getData(default: T): ReadOnlyProperty<Any?, MutableStateFlow<T>>

For use with by delegation. Returns the StateFlowStore entry for the key that equals the property name.