OverlayScene

interface OverlayScene<T : Any> : Scene<T>

A specific scene to render 1 or more NavEntry instances as an overlay.

It is expected that the content is rendered in one or more separate windows (e.g., a dialog, popup window, etc.) that are visible above any additional Scene instances calculated from the overlaidEntries.

When processing overlaidEntries, expect processing of each SceneStrategy to restart from the first strategy. This may result in multiple instances of the same OverlayScene to be shown simultaneously, making a unique key even more important.

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.

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 overlaidEntries: List<NavEntry<T>>

The NavEntrys that should be handled by another Scene that sits below this Scene.

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

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

Functions

Link copied to clipboard
open suspend fun onRemove()

Callback that is invoked after this OverlayScene is popped from the backStack, but before it leaves composition.