Package-level declarations

Functions

Link copied to clipboard
fun ImpressionEffect(vararg inputs: Any?, impression: () -> Unit)

A side effect that will run an impression. This impression will run only once until it is forgotten based on the current RetainedStateRegistry or until the inputs change. This is useful for single fire side effects like logging or analytics.

Link copied to clipboard
fun LaunchedImpressionEffect(vararg inputs: Any?, impression: suspend () -> Unit)

A LaunchedEffect that will run a suspendable impression. The impression will run once until it is forgotten based on the RetainedStateRegistry, and/or until the inputs change. This is useful for async single fire side effects like logging or analytics.

Link copied to clipboard
fun rememberImpressionNavigator(vararg inputs: Any?, navigator: Navigator, impression: suspend () -> Unit): Navigator

A LaunchedImpressionEffect that will also re-run the impression if it re-enters the composition after a navigation event. Navigation should be performed on the returned Navigator and not the provided navigator. This is useful for async single fire side effects like logging or analytics that need to be navigation aware.

Link copied to clipboard
fun toastEffect(duration: Int = Toast.LENGTH_SHORT): (String) -> Unit

A composable function that returns a lambda to show a Toast. Any previously shown toast will be cancelled when a new one is shown or this composable exits composition. The returned lambda can be called with the text to show in the toast.