-
public final class DestinationsNavHostKt
-
-
Method Summary
Modifier and Type Method Description final static UnitDestinationsNavHost(TypedNavHostGraphSpec<?> navGraph, Modifier modifier, Direction start, NavHostAnimatedDestinationStyle defaultTransitions, NavHostEngine engine, NavHostController navController, Function1<DependenciesContainerBuilder<?>, Unit> dependenciesContainerBuilder, Function1<ManualComposableCallsBuilder, Unit> manualComposableCallsBuilder)Like androidx.navigation.compose. -
-
Method Detail
-
DestinationsNavHost
@Composable() final static Unit DestinationsNavHost(TypedNavHostGraphSpec<?> navGraph, Modifier modifier, Direction start, NavHostAnimatedDestinationStyle defaultTransitions, NavHostEngine engine, NavHostController navController, Function1<DependenciesContainerBuilder<?>, Unit> dependenciesContainerBuilder, Function1<ManualComposableCallsBuilder, Unit> manualComposableCallsBuilder)
Like androidx.navigation.compose.NavHost but includes the destinations of navGraph. Composables annotated with
@Destinationwill belong to a NavGraphSpec insideNavGraphsgenerated file. You can also disable theNavGraphsautomatic generation in build.gradle:ksp { arg("compose-destinations.generateNavGraphs", "false") }This might be useful if you need more complex
NavGraphsthen what the usage of the annotation can provide. If you do this, it is advisable that you create yourNavGraphsfile with your navigation graphs in the form of NavGraphSpec implementations.- Parameters:
navGraph- NavGraphSpec to use the DestinationSpecs from and register the navigation graph.modifier- Modifier to apply to this Composablestart- the start Direction of the NavHost.defaultTransitions- default enter/exit transition animations for all destinations.engine- NavHostEngine to use.navController- NavHostController that can be used to navigate between this NavHost's destinations.dependenciesContainerBuilder- offers a DependenciesContainerBuilder where you can add dependencies by their class via com.ramcosta.composedestinations.navigation.dependency.manualComposableCallsBuilder- this will offer a ManualComposableCallsBuilder scope where you can make manual calls to specific DestinationSpec Composables which belong to this navGraph.
-
-
-
-