Package-level declarations

Properties

Link copied to clipboard
val <T : @Serializable Any> KStore<T>.cached: T?

Get the cached value synchronously. Note: This value will be set even when the store's KStore.enableCache is set to false. Note: This value can be null if

Link copied to clipboard
val <T : @Serializable Any> KStore<List<T>>.updatesOrEmpty: Flow<List<T>>

Observe a list store for updates

Functions

Link copied to clipboard
suspend fun <T : @Serializable Any> KStore<List<T>>.get(index: Int): T?

Get an item from list of type T from the store, or null if the store is empty

Link copied to clipboard
suspend fun <T : @Serializable Any> KStore<List<T>>.getOrEmpty(): List<T>

Get a list of type T from the store, or empty list if the store is empty

Link copied to clipboard
suspend fun <T : @Serializable Any> KStore<List<T>>.map(operation: (T) -> T)

Updates the list by applying the given operation lambda to each element in the stored list.

Link copied to clipboard
suspend fun <T : @Serializable Any> KStore<List<T>>.mapIndexed(operation: (Int, T) -> T)

Updates the list by applying the given operation lambda to each element in the stored list and its index in the stored collection.

Link copied to clipboard
suspend fun <T : @Serializable Any> KStore<List<T>>.minus(vararg value: T)

Remove item(s) of type T from the list in the store

Link copied to clipboard
suspend fun <T : @Serializable Any> KStore<List<T>>.plus(vararg value: T)

Add item(s) to the end of the list of type T to the store