screen

actual inline fun <Args> screen(route: String, noinline content: (args: Args?) -> Unit)
actual fun screen(route: String, content: () -> Unit)
expect inline fun <Args> screen(route: String, noinline content: @Composable (args: Args?) -> Unit)

Declare screen content for route and add it to underlying screens map. The screens map will be used to navigate between the screens.

Parameters

route

used to identify the screen when navigating, in order to present it's content

content

Composable lambda with content of the screen that takes screen arguments as a parameter

Throws

when attempting to add new screen for already registered route


expect fun screen(route: String, content: @Composable () -> Unit)

Alternative implementation of screen that does not pass any arguments.

See also

actual inline fun <Args> screen(route: String, noinline content: (args: Args?) -> Unit)
actual fun screen(route: String, content: () -> Unit)