Package-level declarations

Functions

Link copied to clipboard
fun ActivityLifecycleEffect(lifecycleEvent: Lifecycle.Event, onEvent: () -> Unit)

A Side Effect that listens for a specific Lifecycle.Event of the current Activity and triggers a callback when that event occurs.

Link copied to clipboard
fun <T> Flow<T>.collectDataStoreState(initial: () -> T, logTag: String, onErrorReset: (MutableState<T>) -> Unit = {}): State<T>

Collects a Flow as a State specifically designed for DataStore operations within Compose.

Link copied to clipboard

A side effect that listens for specific Lifecycle.Event transitions in the current LocalLifecycleOwner.

Link copied to clipboard
fun <T> MutableState<T>.persistChanges(scope: CoroutineScope, currentValue: () -> T, onPersist: suspend (T) -> Unit, onError: (Throwable, T) -> Unit = { _, latest -> value = latest })

Persists changes emitted by a MutableState using the provided onPersist callback.