continuityRetainedStateRegistry

fun continuityRetainedStateRegistry(key: String = Continuity.KEY, factory: ViewModelProvider.Factory = ContinuityViewModel.Factory, canRetainChecker: CanRetainChecker = LocalCanRetainChecker.current ?: rememberCanRetainChecker()): RetainedStateRegistry(source)

Provides a RetainedStateRegistry.

Parameters

key

the key to use when creating the Continuity instance.

factory

an optional ViewModelProvider.Factory to use when creating the Continuity instance.

canRetainChecker

an optional CanRetainChecker to use when determining whether to retain.


expect fun continuityRetainedStateRegistry(key: String = Continuity.KEY, canRetainChecker: CanRetainChecker = LocalCanRetainChecker.current ?: rememberCanRetainChecker()): RetainedStateRegistry(source)

Provides a RetainedStateRegistry.