Package-level declarations

Types

Link copied to clipboard
actual abstract class ViewModel : ViewModel
expect abstract class ViewModel

ViewModel is tied to specific view, it exposes the view state and encapsulates related business logic.

actual abstract class ViewModel
Link copied to clipboard
actual class VMScreensMapBuilder(screensMapBuilder: ScreensMapBuilder)
expect class VMScreensMapBuilder

Builds screens navigation map same as ScreensMapBuilder, additionally allows passing ViewModel via lambda.

actual class VMScreensMapBuilder

Properties

Link copied to clipboard
val ViewModel.viewModelScope: CoroutineScope

Functions

Link copied to clipboard

Accesses and decode navigation arguments from SavedStateHandle.

Link copied to clipboard
fun VMScreensMapBuilder.screen(route: String, content: @Composable () -> Unit)

Implementation forwarded from ScreensNavigation that does not pass any arguments and does not involve ViewModel initialization.

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

Implementation forwarded from ScreensNavigation which does not involve ViewModel initialization.

Link copied to clipboard
actual fun ScreensNavigation(startRoute: String, enterTransition: AnimatedContentTransitionScope<*>.() -> EnterTransition, exitTransition: AnimatedContentTransitionScope<*>.() -> ExitTransition, popEnterTransition: AnimatedContentTransitionScope<*>.() -> EnterTransition, popExitTransition: AnimatedContentTransitionScope<*>.() -> ExitTransition, builder: VMScreensMapBuilder.() -> Unit)
expect fun ScreensNavigation(startRoute: String, enterTransition: AnimatedContentTransitionScope<*>.() -> EnterTransition = { fadeIn(animationSpec = tween(700)) }, exitTransition: AnimatedContentTransitionScope<*>.() -> ExitTransition = { fadeOut(animationSpec = tween(700)) }, popEnterTransition: AnimatedContentTransitionScope<*>.() -> EnterTransition = enterTransition, popExitTransition: AnimatedContentTransitionScope<*>.() -> ExitTransition = exitTransition, builder: VMScreensMapBuilder.() -> Unit)

Declare screens navigation same as ScreensNavigation but additionally allows declaration of screens with ViewModel.

actual fun ScreensNavigation(startRoute: String, enterTransition: AnimatedContentTransitionScope<*>.() -> EnterTransition, exitTransition: AnimatedContentTransitionScope<*>.() -> ExitTransition, popEnterTransition: AnimatedContentTransitionScope<*>.() -> EnterTransition, popExitTransition: AnimatedContentTransitionScope<*>.() -> ExitTransition, builder: VMScreensMapBuilder.() -> Unit)