StateFlowStore

interface StateFlowStore

Base interface for a temporary observable key-value store.

This is useful for multiplatform projects and also for abstracting away SavedStateHandle, e.g. so you can write tests without Robolectric.

Inheritors

Functions

Link copied to clipboard
abstract operator fun contains(key: String): Boolean
Link copied to clipboard
abstract fun <T> getData(key: String, default: T): 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.