NavigationEntry

data class NavigationEntry(val navigatable: Navigatable, val path: String, val params: Params, val stackPosition: Int = 0)(source)

A single entry in the navigation back stack representing one visited destination.

Entries are immutable; the navigation system creates new instances when state changes. The path is the full slash-separated route (e.g. "auth/login"), while route is just the last segment (e.g. "login").

NavigationEntry is a runtime type holding a direct reference to its navigatable; screens and modals themselves are never serialized. Persistence is handled by NavigationEntrySerializer, which stores only the path, params, and stack position and rehydrates the navigatable from the registered navigation graph on restore.

Constructors

Link copied to clipboard
constructor(navigatable: Navigatable, path: String, params: Params, stackPosition: Int = 0)

Properties

Link copied to clipboard

The navigatable's action resource, directly invokable in composition.

Link copied to clipboard

The graph IDs enclosing this entry, outermost first, derived from path.

Link copied to clipboard

The ID of the NavigationGraph that directly owns this entry, derived from path. Returns "root" for top-level navigatables that live outside a named graph.

Link copied to clipboard
Link copied to clipboard

The destination this entry targets. Read titles and actions directly: entry.navigatable.titleResource, entry.navigatable.actionResource.

Link copied to clipboard
Link copied to clipboard

Parameters passed to this destination at navigation time.

Link copied to clipboard

Full path from the root graph, e.g. "profile/settings".

Link copied to clipboard

The short route of the navigatable (the last segment of path).

Link copied to clipboard

A stable identity key combining path and params, suitable for use as a Compose key. Changes when the entry's destination or parameters change.

Link copied to clipboard

Zero-based index of this entry in the back stack.

Link copied to clipboard

The navigatable's title resource, directly invokable in composition.