rememberNavigationEventState
fun <T : Any> rememberNavigationEventState(sceneState: SceneState<T>): NavigationEventState<SceneInfo<T>>
Remembers and returns a NavigationEventState instance for a SceneState.
This composable creates and remembers a NavigationEventState object, which holds a NavigationEventHandler internally. This is the state object that can be passed to NavigationBackHandler (the composable) to "hoist" the state.
The state's handler info (currentInfo and backInfo) is kept in sync with the provided sceneState.
Return
a stable, remembered NavigationEventState instance.
Parameters
sceneState
the SceneState that this state will track.
Type Parameters
T
the type of the key in the SceneState.