CompositionHostedBoomerangStoreScope

@Composable
fun <T : BoomerangStore> CompositionHostedBoomerangStoreScope(init: () -> T, content: @Composable () -> Unit)(source)

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.

Parameters

T

The type of BoomerangStore to be created

S

The type of the saved state for the BoomerangStore, typically a Bundle

init

A lambda that creates an initial instance of the BoomerangStore

saver

A Saver that defines how to save and restore the BoomerangStore's state, check Saver for more info

content

The content that will have access to the BoomerangStore