Graph

fun Graph(startEntryId: String, ttl: LocalDateTime? = null, defaultTransition: ContentTransitionSchema? = null, defaultPopTransition: ContentTransitionSchema? = null, defaultPredictivePopTransition: ContentTransitionSchema? = null, entries: GraphEntryBuilderScope.() -> Unit): GraphResponse

Builds a top-level navigation graph — a set of screens sharing one back stack, with the stack starting at startEntryId. This is the app's (or a screen area's) root navigator; for a back stack nested inside a single tile, use NestedNavigationGraph instead.

Parameters

startEntryId

Screen id the back stack starts at.

ttl

Cache expiry — the client re-fetches the graph after this datetime instead of using its cached copy. Defaults to none (cached indefinitely).

defaultTransition

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

defaultPopTransition

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

defaultPredictivePopTransition

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

entries

Screens reachable inside this graph, declared with entry.