RouteResolution

data class RouteResolution(val targetNavigatable: Navigatable, val owningGraphId: String, val extractedParams: Params, val requestedGraphId: String? = null, val isGraphReference: Boolean = false, val path: String? = null)(source)

The result of resolving a route string to a concrete Navigatable within the graph hierarchy.

Two graph IDs appear here and they answer different questions. requestedGraphId is the graph the caller named, and owningGraphId is the graph that turned out to own the destination. They differ whenever a graph's start destination is itself a graph reference: asking for wizard whose start is wizard/addons whose start is addons/review resolves to review, owned by addons, requested as wizard. A guard declared on wizard has to fire for that navigation, which is why both are kept.

Constructors

Link copied to clipboard
constructor(targetNavigatable: Navigatable, owningGraphId: String, extractedParams: Params, requestedGraphId: String? = null, isGraphReference: Boolean = false, path: String? = null)

Properties

Link copied to clipboard

Path parameters extracted from the route pattern (e.g. {id}).

Link copied to clipboard

Unused. Removed in a later release.

Link copied to clipboard
Link copied to clipboard

The graph that directly owns targetNavigatable.

Link copied to clipboard
val path: String?
Link copied to clipboard

The graph the caller named, when resolution started from a graph route rather than a destination path. Null when a destination was named directly.

Link copied to clipboard
Link copied to clipboard

The resolved destination.

Functions

Link copied to clipboard

Returns the graph ID that should be used for path building and hierarchy computation. Prefers requestedGraphId when present, otherwise falls back to owningGraphId.