NavigationGraph

A named group of Navigatable destinations and optional nested sub-graphs.

Graphs form the structural backbone of the navigation hierarchy. Each graph has a unique route (its "graph ID"), a list of owned navigatables, and optional nestedGraphs. Guards and entry-point overrides are attached at the graph level via interceptDefinition and entryDefinition.

Use the createNavigationModule { graph(...) { ... } } DSL rather than implementing this interface directly.

See also

NavigationState.isInGraph

Inheritors

Properties

Link copied to clipboard

Dynamic entry-point resolver; overrides startDestination when present.

Link copied to clipboard

Guard evaluated before entering any route within this graph.

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

Optional shared layout wrapper applied to every screen inside this graph.

Link copied to clipboard

Intercept definitions for navigatables registered directly inside an intercept { } block rather than inside a nested named graph. These navigatables land in the parent graph's navigatables list but must still be guarded by the intercept.

Link copied to clipboard

Direct children of this graph.

Link copied to clipboard

Sub-graphs owned by this graph.

Link copied to clipboard
abstract override val route: String
Link copied to clipboard

The default destination shown when navigating to this graph without a specific target.

Functions

Link copied to clipboard

Returns the graph that directly owns a navigatable with the given route, searching recursively through nestedGraphs.

Link copied to clipboard

Returns the nested graph with the given graphId, searching recursively.

Link copied to clipboard

Returns a flat map of route → Navigatable for this graph and all nested graphs.

Link copied to clipboard
open fun resolveStartScreen(graphDefinitions: Map<String, NavigationGraph>): Navigatable?

Resolves the initial Navigatable for this graph, following StartDestination.GraphReference chains through graphDefinitions.