Package 

Class NavGraphBuilderDestinationExtensionsKt

    • Method Detail

      • composable

         final static <T extends Any> Unit composable(NavGraphBuilder $self, TypedDestinationSpec<T> destination, Function1<AnimatedNavGraphBuilderDestinationScope<T>, Unit> content)

        Like androidx.navigation.compose.composable but accepts a DestinationSpec to get the route, arguments and deep links.

        The content lambda will receive the navigation arguments class (T).

        Useful if you opt to use androidx.navigation.compose.NavHost instead of com.ramcosta.composedestinations.DestinationsNavHost. This way, you can build the navigation graph in the "vanilla compose navigation" way. If you do this, you should also disable the NavGraphs generation in build.gradle:

        ksp {
            arg("compose-destinations.generateNavGraphs", "false")
        }
      • dialogComposable

         final static <T extends Any> <ERROR CLASS> dialogComposable(NavGraphBuilder $self, TypedDestinationSpec<T> destination, Function1<NavGraphBuilderDestinationScope<T>, Unit> content)

        Like androidx.navigation.compose.dialog but accepts a DestinationSpec to get the route, arguments and deep links.

        The content lambda will receive the navigation arguments class (T).

        Useful if you opt to use androidx.navigation.compose.NavHost instead of com.ramcosta.composedestinations.DestinationsNavHost. This way, you can build the navigation graph in the "vanilla compose navigation" way. If you do this, you should also disable the NavGraphs generation in build.gradle:

        ksp {
            arg("compose-destinations.generateNavGraphs", "false")
        }
      • activity

         final static <T extends Any> <ERROR CLASS> activity(NavGraphBuilder $self, ActivityDestinationSpec<T> destination)

        Like androidx.navigation.activity but accepts a ActivityDestinationSpec to get the route, arguments and deep links.

        Useful if you opt to use androidx.navigation.compose.NavHost instead of com.ramcosta.composedestinations.DestinationsNavHost. This way, you can build the navigation graph in the "vanilla compose navigation" way. If you do this, you should also disable the NavGraphs generation in build.gradle:

        ksp {
            arg("compose-destinations.generateNavGraphs", "false")
        }