NestedNavigationGraph

fun TileSchemaBuilderScope.NestedNavigationGraph(id: String = randomId(), events: EventSchemaBuilderScope.() -> Unit = {}, style: StyleSchemaBuilderScope.() -> Unit = {}, visibility: TileSchema.Visibility = visible(), searchableTerms: List<String>? = null, navigatorId: String, startEntryId: String, defaultTransition: ContentTransitionSchema? = null, defaultPopTransition: ContentTransitionSchema? = null, defaultPredictivePopTransition: ContentTransitionSchema? = null, entries: NestedNavigationGraphEntryBuilderScope.() -> Unit)

Hosts a self-contained navigation back stack inside a tile, so a region of a screen can navigate independently of the rest. The stack starts at startEntryId and every screen it can show is declared via entries (built with entry). On first composition the tile registers itself under navigatorId — that id is how Navigate events address this graph — and that registration (along with each entry) is torn down when the tile leaves composition, so the graph and its entries only exist while the tile is on screen; each entry gets its own state holder, so screen state survives navigating back and forth within the graph. The system back gesture pops this graph's own stack, not the outer one. For each navigation, the entry's own Entry transitions win; when an entry does not define one, defaultTransition / defaultPopTransition / defaultPredictivePopTransition apply; when neither is set the navigation is instantaneous. Dispatches onNavigationEntrySet(screenId) whenever an entry is displayed — including the start destination and every time navigation returns to an entry — so events can be wired per destination.

Parameters

id

Unique identifier of the tile. Defaults to a random id.

events

Events owned by this tile, wired to its triggers (e.g. onNavigationEntrySet).

style

Layout/appearance modifiers (size, padding, background, etc).

visibility

Whether the tile is shown, hidden but occupies space, or removed from layout. Defaults to visible.

searchableTerms

Terms used by an ancestor's search/filter to decide whether this tile matches. Defaults to none.

navigatorId

Identifier this graph registers under, used by Navigate events to target it.

startEntryId

Screen id of the entry the stack starts at.

defaultTransition

Fallback enter/exit transition used by entries that don't declare their own. Defaults to none (instantaneous).

defaultPopTransition

Fallback back-navigation transition used by entries that don't declare their own. Defaults to none (instantaneous).

defaultPredictivePopTransition

Fallback predictive-back-gesture transition used by entries that don't declare their own. Defaults to none (instantaneous).

entries

Screens reachable inside this graph, declared with entry.