ScreensMapBuilder

actual open class ScreensMapBuilder
expect open class ScreensMapBuilder

Builds screens navigation map.

Has separate implementations for Android and non Android targets.

actual open class ScreensMapBuilder

Constructors

Link copied to clipboard
constructor(navGraphBuilder: NavGraphBuilder)
constructor()

Properties

Link copied to clipboard
Link copied to clipboard

Map of all registered screen routes and their corresponding contents represented as a Composable lambda.

Functions

Link copied to clipboard
fun build(): Map<String, @Composable (Any?) -> Unit>

Build immutable map of with screen route as keys and contents as values.

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

Alternative implementation of screen that does not pass any arguments.

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.

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