Common
Deprecated Deprecated in favor of composable builder that supports AnimatedContent
composable
public fun NavGraphBuilder.composable(
route: String,
arguments: List<NamedNavArgument> = emptyList(),
deepLinks: List<NavDeepLink> = emptyList(),
content: @Composable (NavBackStackEntry) -> Unit,
)
Add the Composable to the NavGraphBuilder
Parameters
| route | route for the destination |
| arguments | list of arguments to associate with destination |
| deepLinks | list of deep links to associate with the destinations |
| content | composable for the destination |
Common
Deprecated Deprecated in favor of composable builder that supports sizeTransform
composable
public fun NavGraphBuilder.composable(
route: String,
arguments: List<NamedNavArgument> = emptyList(),
deepLinks: List<NavDeepLink> = emptyList(),
enterTransition:
(@JvmSuppressWildcards
AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition?)? =
null,
exitTransition:
(@JvmSuppressWildcards
AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition?)? =
null,
popEnterTransition:
(@JvmSuppressWildcards
AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition?)? =
enterTransition,
popExitTransition:
(@JvmSuppressWildcards
AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition?)? =
exitTransition,
content: @Composable AnimatedContentScope.(NavBackStackEntry) -> Unit,
)
Add the Composable to the NavGraphBuilder
Parameters
| route | route for the destination |
| arguments | list of arguments to associate with destination |
| deepLinks | list of deep links to associate with the destinations |
| enterTransition | callback to determine the destination's enter transition |
| exitTransition | callback to determine the destination's exit transition |
| popEnterTransition | callback to determine the destination's popEnter transition |
| popExitTransition | callback to determine the destination's popExit transition |
| content | composable for the destination |
composable
Common
public fun NavGraphBuilder.composable(
route: String,
arguments: List<NamedNavArgument> = emptyList(),
deepLinks: List<NavDeepLink> = emptyList(),
enterTransition:
(@JvmSuppressWildcards
AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition?)? =
null,
exitTransition:
(@JvmSuppressWildcards
AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition?)? =
null,
popEnterTransition:
(@JvmSuppressWildcards
AnimatedContentTransitionScope<NavBackStackEntry>.() -> EnterTransition?)? =
enterTransition,
popExitTransition:
(@JvmSuppressWildcards
AnimatedContentTransitionScope<NavBackStackEntry>.() -> ExitTransition?)? =
exitTransition,
sizeTransform:
(@JvmSuppressWildcards
AnimatedContentTransitionScope<NavBackStackEntry>.() -> SizeTransform?)? =
null,
content: @Composable AnimatedContentScope.(NavBackStackEntry) -> Unit,
)
Add the Composable to the NavGraphBuilder
Parameters
| route | route for the destination |
| arguments | list of arguments to associate with destination |
| deepLinks | list of deep links to associate with the destinations |
| enterTransition | callback to determine the destination's enter transition |
| exitTransition | callback to determine the destination's exit transition |
| popEnterTransition | callback to determine the destination's popEnter transition |
| popExitTransition | callback to determine the destination's popExit transition |
| sizeTransform | callback to determine the destination's sizeTransform. |
| content | composable for the destination |
composable
Common
public inline fun <reified T : Any> NavGraphBuilder.composable(
typeMap: Map<KType, @JvmSuppressWildcards NavType<*>> = emptyMap(),
deepLinks: List<NavDeepLink> = emptyList(),
noinline enterTransition:
(AnimatedContentTransitionScope<NavBackStackEntry>.() -> @JvmSuppressWildcards
EnterTransition?)? =
null,
noinline exitTransition:
(AnimatedContentTransitionScope<NavBackStackEntry>.() -> @JvmSuppressWildcards
ExitTransition?)? =
null,
noinline popEnterTransition:
(AnimatedContentTransitionScope<NavBackStackEntry>.() -> @JvmSuppressWildcards
EnterTransition?)? =
enterTransition,
noinline popExitTransition:
(AnimatedContentTransitionScope<NavBackStackEntry>.() -> @JvmSuppressWildcards
ExitTransition?)? =
exitTransition,
noinline sizeTransform:
(AnimatedContentTransitionScope<NavBackStackEntry>.() -> @JvmSuppressWildcards
SizeTransform?)? =
null,
noinline content: @Composable AnimatedContentScope.(NavBackStackEntry) -> Unit,
)
Add the Composable to the NavGraphBuilder
Parameters
| T | route from a KClass for the destination |
| typeMap | map of destination arguments' kotlin type KType to its respective custom NavType. May be empty if T does not use custom NavTypes. |
| deepLinks | list of deep links to associate with the destinations |
| enterTransition | callback to determine the destination's enter transition |
| exitTransition | callback to determine the destination's exit transition |
| popEnterTransition | callback to determine the destination's popEnter transition |
| popExitTransition | callback to determine the destination's popExit transition |
| sizeTransform | callback to determine the destination's sizeTransform. |
| content | composable for the destination |
composable
Common
public fun <T : Any> NavGraphBuilder.composable(
route: KClass<T>,
typeMap: Map<KType, @JvmSuppressWildcards NavType<*>> = emptyMap(),
deepLinks: List<NavDeepLink> = emptyList(),
enterTransition:
(AnimatedContentTransitionScope<NavBackStackEntry>.() -> @JvmSuppressWildcards
EnterTransition?)? =
null,
exitTransition:
(AnimatedContentTransitionScope<NavBackStackEntry>.() -> @JvmSuppressWildcards
ExitTransition?)? =
null,
popEnterTransition:
(AnimatedContentTransitionScope<NavBackStackEntry>.() -> @JvmSuppressWildcards
EnterTransition?)? =
enterTransition,
popExitTransition:
(AnimatedContentTransitionScope<NavBackStackEntry>.() -> @JvmSuppressWildcards
ExitTransition?)? =
exitTransition,
sizeTransform:
(AnimatedContentTransitionScope<NavBackStackEntry>.() -> @JvmSuppressWildcards
SizeTransform?)? =
null,
content: @Composable AnimatedContentScope.(NavBackStackEntry) -> Unit,
)
Add the Composable to the NavGraphBuilder
Parameters
| route | route from a KClass for the destination |
| typeMap | map of destination arguments' kotlin type KType to its respective custom NavType. May be empty if route does not use custom NavTypes. |
| deepLinks | list of deep links to associate with the destinations |
| enterTransition | callback to determine the destination's enter transition |
| exitTransition | callback to determine the destination's exit transition |
| popEnterTransition | callback to determine the destination's popEnter transition |
| popExitTransition | callback to determine the destination's popExit transition |
| sizeTransform | callback to determine the destination's sizeTransform. |
| content | composable for the destination |