Package-level declarations

Types

Link copied to clipboard

Object that provides access to a BoomerangStore in Jetpack Compose. This is the main entry point for accessing a BoomerangStore in a Compose UI.

Functions

Link copied to clipboard
@Composable
fun ActivityHostedBoomerangStoreScope(content: @Composable () -> Unit)

A Composable function that provides a BoomerangStore from an Activity that implements BoomerangStoreHost to its content. This function retrieves the BoomerangStore from the hosting Activity and makes it available to the content via LocalBoomerangStore. This function should be used when your app uses both Composables and Fragments for navigation. For more info check BoomerangStoreHost.

Link copied to clipboard
@Composable
fun CatchBoomerangLifecycleEffect(key: String, lifecycleEvent: Lifecycle.Event = Lifecycle.Event.ON_START, catcher: BoomerangCatcher)

A Composable effect that tries to catch a boomerang value from the BoomerangStore when a specific lifecycle event occurs. This effect is typically used to process data that was stored in the BoomerangStore when the UI becomes visible. Example usage

Link copied to clipboard
@Composable
inline fun CatchEventBoomerangLifecycleEffect(key: String, lifecycleEvent: Lifecycle.Event = Lifecycle.Event.ON_START, crossinline onEvent: () -> Unit)

A specialized Composable effect for catching event notifications from the BoomerangStore. This is a convenience function that simplifies catching events in Compose UI.

Link copied to clipboard
@Composable
fun <T : BoomerangStore> CompositionHostedBoomerangStoreScope(init: () -> T, content: @Composable () -> Unit)

A Composable function that creates a custom BoomerangStore and provides it to its content via LocalBoomerangStore. The store is saved and restored across configuration changes using rememberSaveable with a custom saver. This function is useful when you want to use a custom implementation of BoomerangStore instead of the default one. It should be used on the top-level of your Compose application before creating Navigation components.

@Composable
fun CompositionHostedDefaultBoomerangStoreScope(content: @Composable () -> Unit)

A Composable function that creates a DefaultBoomerangStore and provides it to its content via LocalBoomerangStore. The store is saved and restored across configuration changes using rememberSaveable with a custom saver. This function is useful when you have fully Composable navigation. It should be used on the top-level of your Compose application before creating Navigation components (f.e. before calling NavHost in Jetpack Navigation). Example usage

Link copied to clipboard
@Composable
inline fun ConsumeBoomerangLifecycleEffect(key: String, lifecycleEvent: Lifecycle.Event = Lifecycle.Event.ON_START, crossinline catcher: (Boomerang) -> Unit)

A Composable effect that tries to catch a boomerang value from the BoomerangStore when a specific lifecycle event occurs. This is an inline version that accepts a lambda function instead of a BoomerangCatcher. This effect is typically used to process data that was stored in the BoomerangStore when the UI becomes visible. Example usage

Link copied to clipboard
@Composable
actual fun <T : BoomerangStore> rememberBoomerangStore(init: () -> T): T

Android-specific implementation of rememberBoomerangStore.

@Composable
expect fun <T : BoomerangStore> rememberBoomerangStore(init: () -> T): T

Remembers a BoomerangStore across recompositions and configuration changes. This function is implemented differently on each platform to ensure proper state saving and restoration.

@Composable
actual fun <T : BoomerangStore> rememberBoomerangStore(init: () -> T): T

Desktop-specific implementation of rememberBoomerangStore.

@Composable
actual fun <T : BoomerangStore> rememberBoomerangStore(init: () -> T): T

iOS-specific implementation of rememberBoomerangStore.