screen
Registers a NavKey subclass K with its composable screen content.
The content lambda receives the typed key so route arguments are accessible directly:
screen<AppScreen.Home> { HomeScreen() }
screen<AppScreen.Detail> { key -> DetailScreen(id = key.id) }Content copied to clipboard
Inside content, use io.github.alimsrepo.navease.runtime.composition.LocalNavEaseController to access the io.github.alimsrepo.navease.runtime.navigation.NavEaseController:
val nav = LocalNavEaseController.current
nav.navigate(AppScreen.Detail(id = "xyz"))Content copied to clipboard
Type Parameters
K
The NavKey subclass for this screen. Must be annotated with @Serializable.