NavigationEntry

@Serializable
data class NavigationEntry(val path: String, val params: Params, val stackPosition: Int = 0, val navigatableRoute: String = path.substringAfterLast("/"))(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").

Constructors

Link copied to clipboard
constructor(path: String, params: Params, stackPosition: Int = 0, navigatableRoute: String = path.substringAfterLast("/"))

Properties

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

The route of the Navigatable that this entry targets (the last segment of path).

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

Alias for navigatableRoute — the short route of the Navigatable.

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.