Scene

interface Scene<T : Any>

A specific scene to render 1 or more NavEntrys.

A scene instance is identified by its key and the class of the Scene, and this change drives the top-level animation based on the SceneStrategy calculating what the current Scene is for the backstack.

The rendering for content should invoke the content for each NavEntry contained in entries at most once concurrently in a given Scene.

It is valid for two different instances of a Scene to render the same NavEntry. In this situation, the content for a NavEntry will only be rendered in the most recent target Scene that it is displayed in, as determined by entries.

Important Implementations of this interface should either be data classes, or implement equals and hashcode to ensure that the same Scene is used when appropriate.

Inheritors

Properties

Link copied to clipboard
abstract val content: @Composable () -> Unit

The content rendering the Scene itself.

Link copied to clipboard
abstract val entries: List<NavEntry<T>>

The list of NavEntrys that can be displayed in this scene.

Link copied to clipboard
abstract val key: Any

The key identifying the Scene. This key will be combined with the class of the Scene to determine the key that drives the transition in the top-level animation for the NavDisplay.

Link copied to clipboard
Link copied to clipboard
abstract val previousEntries: List<NavEntry<T>>

The resulting NavEntrys that should be computed after pressing back updates the backstack.