NavigationProjection

@Serializable
data class NavigationProjection(source)

Everything about the navigation position that is a pure function of the back stack, the active modal contexts, and the registered graph definitions.

The reducer computes one of these per state change and io.github.syrou.reaktiv.navigation.NavigationState exposes each field through an accessor of the same name, so callers read navState.visibleLayers rather than navState.derived.visibleLayers.

Adding a derived value means adding it here and adding one accessor, rather than threading a field through the state class, an intermediate holder, and every construction site.

The constructor is internal on purpose: a projection is something the reducer computes from the back stack, never something a caller supplies. Nothing outside the navigation module can fabricate one, so a derived value cannot disagree with the stack it describes.

Properties

Link copied to clipboard

Breadcrumb trail derived from currentFullPath.

Link copied to clipboard

The full slash-separated path for the current entry.

Link copied to clipboard

Graph IDs from root to the graph containing the current entry.

Link copied to clipboard

true when at least one modal is present anywhere in the back stack.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

All modal entries currently present in the back stack.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

true when the current destination wants a navigation header.

Link copied to clipboard

The screen rendered underneath the current modal, or null.

Link copied to clipboard

Entries that should be rendered, ordered from bottom to top layer.