Common
Deprecated Deprecated in favor of rememberSceneState that supports sharedTransitionScope, sceneDecoratorStrategies, and list of SceneStrategies
rememberSceneState
@Composable
public fun <T : Any> rememberSceneState(
entries: List<NavEntry<T>>,
sceneStrategy: SceneStrategy<T>,
onBack: () -> Unit,
): SceneState<T>
Returns a SceneState that is remembered across compositions based on the parameters.
This calculates all of the scenes and provides them in a SceneState.
Parameters
| entries | all of the entries that are associated with this state |
| sceneStrategy | the SceneStrategy to determine which scene to render a list of entries. |
| onBack | a callback for handling system back press. |
rememberSceneState
Common
@Composable
public fun <T : Any> rememberSceneState(
entries: List<NavEntry<T>>,
sceneStrategies: List<SceneStrategy<T>>,
sceneDecoratorStrategies: List<SceneDecoratorStrategy<T>> = emptyList(),
sharedTransitionScope: SharedTransitionScope? = null,
onBack: () -> Unit,
): SceneState<T>
Returns a SceneState that is remembered across compositions based on the parameters.
This calculates all of the scenes and provides them in a SceneState.
Parameters
| entries | all of the entries that are associated with this state |
| sceneStrategies | the list of SceneStrategy to determine which scene to render a list of entries. |
| sceneDecoratorStrategies | list of SceneDecoratorStrategy to add content to the scene. |
| sharedTransitionScope | the SharedTransitionScope needed to wrap the scene decorator. If this parameter is added, this function will require the androidx.navigation3.ui.LocalNavAnimatedContentScope. |
| onBack | a callback for handling system back press. |