NavEaseNavGraph
Core navigation host composable — KSP / legacy variant.
Accepts the classic (NavKey) -> NavScreen factory produced by KSP or written by hand. Prefer the NavEaseGraph overload for new projects — it requires no code generation and has zero rebuild friction.
Parameters
The first screen placed on the back stack.
Serialization config for back-stack state restoration.
Called when back is pressed at the root screen. No-op by default.
When true, wraps in SharedTransitionLayout.
Default screen-transition animation. Defaults to NavTransition.Push.
Core navigation host composable — zero-rebuild DSL variant.
Accepts a NavEaseGraph built with navEaseGraph. No code generation, no KSP, no rebuild required after adding a new screen.
val appGraph = navEaseGraph(start = AppScreen.Home) {
screen<AppScreen.Home> { HomeScreen() }
screen<AppScreen.Detail> { key -> DetailScreen(id = key.id) }
}
// In your root composable:
NavEaseNavGraph(appGraph)Parameters
The navigation graph built via navEaseGraph.
Called when back is pressed at the root screen. No-op by default.
When true, wraps in SharedTransitionLayout.
Default screen-transition animation. Defaults to NavTransition.Push.