@<Error class: unknown class>
class DynamicNavGraphBuilder


DSL for constructing a new DynamicGraphNavigator.DynamicNavGraph

Summary

Public constructors

DynamicNavGraphBuilder(
    provider: <Error class: unknown class>,
    id: @IdRes Int,
    startDestination: @IdRes Int
)

This function is deprecated. Use routes to create your DynamicNavGraphBuilder instead

DynamicNavGraphBuilder(
    provider: <Error class: unknown class>,
    startDestination: String,
    route: String?
)
DynamicNavGraphBuilder(
    provider: <Error class: unknown class>,
    startDestination: Any,
    route: KClass<*>?,
    typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>>
)

DSL for constructing a new DynamicGraphNavigator.DynamicNavGraph

DynamicNavGraphBuilder(
    provider: <Error class: unknown class>,
    startDestination: KClass<*>,
    route: KClass<*>?,
    typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>>
)

DSL for constructing a new DynamicGraphNavigator.DynamicNavGraph

Public functions

open <Error class: unknown class>

Public properties

String?

The module name of this Destination's dynamic feature module.

Int

ID of the destination displayed during module installation.

String?

Route of the destination displayed during module installation.

Extension functions

inline Unit

This function is deprecated. Use routes to build your DynamicActivityDestination instead

inline Unit

Construct a new DynamicActivityNavigator.Destination

inline Unit

Construct a new DynamicActivityNavigator.Destination

inline Unit

This function is deprecated. Use routes to create your DynamicFragmentDestination instead

inline Unit

Construct a new DynamicFragmentNavigator.Destination

inline Unit

Construct a new DynamicFragmentNavigator.Destination

inline Unit

This function is deprecated. Use routes to create your DynamicFragmentDestination instead

inline Unit

Construct a new DynamicFragmentNavigator.Destination

inline Unit

Construct a new DynamicFragmentNavigator.Destination

inline Unit

Construct a new DynamicFragmentNavigator.Destination

inline Unit
DynamicNavGraphBuilder.fragment(
    id: @IdRes Int,
    fragmentClassName: String,
    builder: DynamicFragmentNavigatorDestinationBuilder.() -> Unit
)

This function is deprecated. Use routes to create your DynamicFragmentDestination instead

inline Unit
DynamicNavGraphBuilder.fragment(
    route: String,
    fragmentClassName: String,
    builder: DynamicFragmentNavigatorDestinationBuilder.() -> Unit
)

Construct a new DynamicFragmentNavigator.Destination

inline Unit
DynamicNavGraphBuilder.includeDynamic(
    id: @IdRes Int,
    moduleName: String,
    graphResourceName: String
)

This function is deprecated. Use routes to include your DynamicNavGraph instead

inline Unit
<T : Any> DynamicNavGraphBuilder.includeDynamic(
    moduleName: String,
    graphResourceName: String,
    typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>>
)

Construct a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.

inline Unit
DynamicNavGraphBuilder.includeDynamic(
    route: String,
    moduleName: String,
    graphResourceName: String
)

Construct a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.

inline Unit
DynamicNavGraphBuilder.includeDynamic(
    id: @IdRes Int,
    moduleName: String,
    graphResourceName: String,
    builder: DynamicIncludeNavGraphBuilder.() -> Unit
)

This function is deprecated. Use routes to include your DynamicNavGraph instead

inline Unit
<T : Any> DynamicNavGraphBuilder.includeDynamic(
    moduleName: String,
    graphResourceName: String,
    typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>>,
    builder: DynamicIncludeNavGraphBuilder.() -> Unit
)

Construct a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.

inline Unit
DynamicNavGraphBuilder.includeDynamic(
    route: String,
    moduleName: String,
    graphResourceName: String,
    builder: DynamicIncludeNavGraphBuilder.() -> Unit
)

Construct a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.

inline Unit
DynamicNavGraphBuilder.navigation(
    id: @IdRes Int,
    startDestination: @IdRes Int,
    builder: DynamicNavGraphBuilder.() -> Unit
)

This function is deprecated. Use routes to create your DynamicNavGraph instead

inline Unit
<T : Any> DynamicNavGraphBuilder.navigation(
    startDestination: Any,
    typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>>,
    builder: DynamicNavGraphBuilder.() -> Unit
)

Construct a nested DynamicGraphNavigator.DynamicNavGraph

inline Unit
<T : Any> DynamicNavGraphBuilder.navigation(
    startDestination: KClass<*>,
    typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>>,
    builder: DynamicNavGraphBuilder.() -> Unit
)

Construct a nested DynamicGraphNavigator.DynamicNavGraph

inline Unit
DynamicNavGraphBuilder.navigation(
    startDestination: String,
    route: String,
    builder: DynamicNavGraphBuilder.() -> Unit
)

Construct a nested DynamicGraphNavigator.DynamicNavGraph

Public constructors

DynamicNavGraphBuilder(
    provider: <Error class: unknown class>,
    id: @IdRes Int,
    startDestination: @IdRes Int
)
DynamicNavGraphBuilder(
    provider: <Error class: unknown class>,
    startDestination: String,
    route: String? = null
)
DynamicNavGraphBuilder(
    provider: <Error class: unknown class>,
    startDestination: Any,
    route: KClass<*>?,
    typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>>
)

DSL for constructing a new DynamicGraphNavigator.DynamicNavGraph

Parameters
provider: <Error class: unknown class>

navigator used to create the destination

startDestination: Any

the starting destination's route as an Object for this NavGraph. The respective NavDestination must be added with route from a KClass in order to match.

route: KClass<*>?

the graph's unique route as a KClass

typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>>

A mapping of KType to custom NavType<*> in the route. May be empty if route does not use custom NavTypes.

Returns
DynamicNavGraphBuilder

the newly created NavGraph

DynamicNavGraphBuilder(
    provider: <Error class: unknown class>,
    startDestination: KClass<*>,
    route: KClass<*>?,
    typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>>
)

DSL for constructing a new DynamicGraphNavigator.DynamicNavGraph

Parameters
provider: <Error class: unknown class>

navigator used to create the destination

startDestination: KClass<*>

the starting destination's route as a KClass for this NavGraph. The respective NavDestination must be added with route from a KClass in order to match.

route: KClass<*>?

the graph's unique route as a KClass

typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>>

A mapping of KType to custom NavType<*> in the route. May be empty if route does not use custom NavTypes.

Returns
DynamicNavGraphBuilder

the newly created NavGraph

Public properties

moduleName

Added in 2.3.0
var moduleNameString?

The module name of this Destination's dynamic feature module. This has to be the same as defined in the dynamic feature module's AndroidManifest.xml file.

progressDestination

Added in 2.3.0
var progressDestinationInt

ID of the destination displayed during module installation. This generally does not need to be set, but is instead filled in by the NavHost via DynamicGraphNavigator.installDefaultProgressDestination.

Setting this clears any previously set progressDestinationRoute.

progressDestinationRoute

Added in 2.4.0
var progressDestinationRouteString?

Route of the destination displayed during module installation. This generally does not need to be set, but is instead filled in by the NavHost via DynamicGraphNavigator.installDefaultProgressDestination.

Setting this overrides any previously set progressDestination.

Extension functions

inline fun DynamicNavGraphBuilder.activity(id: @IdRes Int, builder: DynamicActivityNavigatorDestinationBuilder.() -> Unit): Unit

Construct a new DynamicActivityNavigator.Destination

Parameters
id: @IdRes Int

Destination id.

inline fun DynamicNavGraphBuilder.activity(route: String, builder: DynamicActivityNavigatorDestinationBuilder.() -> Unit): Unit

Construct a new DynamicActivityNavigator.Destination

Parameters
route: String

Destination route.

builder: DynamicActivityNavigatorDestinationBuilder.() -> Unit

the builder used to construct the graph

inline fun <T : Any> DynamicNavGraphBuilder.activity(
    typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>> = emptyMap(),
    builder: DynamicActivityNavigatorDestinationBuilder.() -> Unit
): Unit

Construct a new DynamicActivityNavigator.Destination

Parameters
<T : Any>

Destination route from a KClass

typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>> = emptyMap()

A mapping of KType to custom NavType<*> in the T. May be empty if T does not use custom NavTypes.

builder: DynamicActivityNavigatorDestinationBuilder.() -> Unit

the builder used to construct the graph

inline fun <F : Fragment> DynamicNavGraphBuilder.fragment(id: @IdRes Int): Unit

Construct a new DynamicFragmentNavigator.Destination

Parameters
id: @IdRes Int

Destination id.

inline fun <F : Fragment> DynamicNavGraphBuilder.fragment(route: String): Unit

Construct a new DynamicFragmentNavigator.Destination

Parameters
route: String

Destination route.

inline fun <F : Fragment, T : Any> DynamicNavGraphBuilder.fragment(
    typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>> = emptyMap()
): Unit

Construct a new DynamicFragmentNavigator.Destination

Parameters
<T : Any>

the destination's unique route from a KClass

typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>> = emptyMap()

map of destination arguments' kotlin type KType to its respective custom NavType. May be empty if T does not use custom NavTypes.

inline fun <F : Fragment> DynamicNavGraphBuilder.fragment(
    id: @IdRes Int,
    builder: DynamicFragmentNavigatorDestinationBuilder.() -> Unit
): Unit

Construct a new DynamicFragmentNavigator.Destination

Parameters
id: @IdRes Int

Destination id.

inline fun <F : Fragment> DynamicNavGraphBuilder.fragment(
    route: String,
    builder: DynamicFragmentNavigatorDestinationBuilder.() -> Unit
): Unit

Construct a new DynamicFragmentNavigator.Destination

Parameters
route: String

Destination route.

builder: DynamicFragmentNavigatorDestinationBuilder.() -> Unit

the builder used to construct the fragment destination

inline fun <F : Fragment, T : Any> DynamicNavGraphBuilder.fragment(
    typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>> = emptyMap(),
    builder: DynamicFragmentNavigatorDestinationBuilder.() -> Unit
): Unit

Construct a new DynamicFragmentNavigator.Destination

Parameters
<T : Any>

the destination's unique route from a KClass

typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>> = emptyMap()

map of destination arguments' kotlin type KType to its respective custom NavType. May be empty if T does not use custom NavTypes.

builder: DynamicFragmentNavigatorDestinationBuilder.() -> Unit

the builder used to construct the fragment destination

inline fun <T : Any> DynamicNavGraphBuilder.fragment(
    fragmentClassName: String,
    typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>> = emptyMap(),
    builder: DynamicFragmentNavigatorDestinationBuilder.() -> Unit
): Unit

Construct a new DynamicFragmentNavigator.Destination

Parameters
<T : Any>

the destination's unique route from a KClass

fragmentClassName: String

Fully qualified class name of destination Fragment.

typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>> = emptyMap()

map of destination arguments' kotlin type KType to its respective custom NavType. May be empty if T does not use custom NavTypes.

builder: DynamicFragmentNavigatorDestinationBuilder.() -> Unit

the builder used to construct the fragment destination

inline fun DynamicNavGraphBuilder.fragment(
    id: @IdRes Int,
    fragmentClassName: String,
    builder: DynamicFragmentNavigatorDestinationBuilder.() -> Unit
): Unit

Construct a new DynamicFragmentNavigator.Destination

Parameters
id: @IdRes Int

Destination id.

fragmentClassName: String

Fully qualified class name of destination Fragment.

inline fun DynamicNavGraphBuilder.fragment(
    route: String,
    fragmentClassName: String,
    builder: DynamicFragmentNavigatorDestinationBuilder.() -> Unit
): Unit

Construct a new DynamicFragmentNavigator.Destination

Parameters
route: String

Destination route.

fragmentClassName: String

Fully qualified class name of destination Fragment.

builder: DynamicFragmentNavigatorDestinationBuilder.() -> Unit

the builder used to construct the fragment destination

inline fun DynamicNavGraphBuilder.includeDynamic(
    id: @IdRes Int,
    moduleName: String,
    graphResourceName: String
): Unit

Construct a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.

Parameters
id: @IdRes Int

NavGraph id.

moduleName: String

Dynamic feature module name as defined in the module's AndroidManifest. This must not be an empty string.

graphResourceName: String

Graph's resource name without the navigation qualifier. This must not be an empty string.

inline fun <T : Any> DynamicNavGraphBuilder.includeDynamic(
    moduleName: String,
    graphResourceName: String,
    typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>> = emptyMap()
): Unit

Construct a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.

Parameters
<T : Any>

the graph's unique route as a KClass

moduleName: String

Dynamic feature module name as defined in the module's AndroidManifest. This must not be an empty string.

graphResourceName: String

Graph's resource name without the navigation qualifier. This must not be an empty string.

typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>> = emptyMap()

A mapping of KType to custom NavType<*> in the T. May be empty if T does not use custom NavTypes.

inline fun DynamicNavGraphBuilder.includeDynamic(
    route: String,
    moduleName: String,
    graphResourceName: String
): Unit

Construct a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.

Parameters
route: String

NavGraph route.

moduleName: String

Dynamic feature module name as defined in the module's AndroidManifest. This must not be an empty string.

graphResourceName: String

Graph's resource name without the navigation qualifier. This must not be an empty string.

inline fun DynamicNavGraphBuilder.includeDynamic(
    id: @IdRes Int,
    moduleName: String,
    graphResourceName: String,
    builder: DynamicIncludeNavGraphBuilder.() -> Unit
): Unit

Construct a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.

Parameters
id: @IdRes Int

NavGraph id.

moduleName: String

Dynamic feature module name as defined in the module's AndroidManifest. This must not be an empty string.

graphResourceName: String

Graph's resource name without the navigation qualifier. This must not be an empty string.

builder: DynamicIncludeNavGraphBuilder.() -> Unit

Another builder for chaining.

inline fun <T : Any> DynamicNavGraphBuilder.includeDynamic(
    moduleName: String,
    graphResourceName: String,
    typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>> = emptyMap(),
    builder: DynamicIncludeNavGraphBuilder.() -> Unit
): Unit

Construct a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.

Parameters
<T : Any>

the graph's unique route as a KClass

moduleName: String

Dynamic feature module name as defined in the module's AndroidManifest. This must not be an empty string.

graphResourceName: String

Graph's resource name without the navigation qualifier. This must not be an empty string.

typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>> = emptyMap()

A mapping of KType to custom NavType<*> in the T. May be empty if T does not use custom NavTypes.

builder: DynamicIncludeNavGraphBuilder.() -> Unit

Another builder for chaining.

inline fun DynamicNavGraphBuilder.includeDynamic(
    route: String,
    moduleName: String,
    graphResourceName: String,
    builder: DynamicIncludeNavGraphBuilder.() -> Unit
): Unit

Construct a new DynamicIncludeGraphNavigator.DynamicIncludeNavGraph.

Parameters
route: String

NavGraph route.

moduleName: String

Dynamic feature module name as defined in the module's AndroidManifest. This must not be an empty string.

graphResourceName: String

Graph's resource name without the navigation qualifier. This must not be an empty string.

builder: DynamicIncludeNavGraphBuilder.() -> Unit

Another builder for chaining.

inline fun DynamicNavGraphBuilder.navigation(
    id: @IdRes Int,
    startDestination: @IdRes Int,
    builder: DynamicNavGraphBuilder.() -> Unit
): Unit

Construct a nested DynamicGraphNavigator.DynamicNavGraph

Parameters
id: @IdRes Int

NavGraph id.

startDestination: @IdRes Int

Id start destination in the graph

builder: DynamicNavGraphBuilder.() -> Unit

Another builder for chaining.

inline fun <T : Any> DynamicNavGraphBuilder.navigation(
    startDestination: Any,
    typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>> = emptyMap(),
    builder: DynamicNavGraphBuilder.() -> Unit
): Unit

Construct a nested DynamicGraphNavigator.DynamicNavGraph

Parameters
<T : Any>

the graph's unique route as a KClass

startDestination: Any

the starting destination's route from an Object for this NavGraph. The respective NavDestination must be added with route from a KClass in order to match.

typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>> = emptyMap()

A mapping of KType to custom NavType<*> in the T. May be empty if T does not use custom NavTypes.

builder: DynamicNavGraphBuilder.() -> Unit

Another builder for chaining.

inline fun <T : Any> DynamicNavGraphBuilder.navigation(
    startDestination: KClass<*>,
    typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>> = emptyMap(),
    builder: DynamicNavGraphBuilder.() -> Unit
): Unit

Construct a nested DynamicGraphNavigator.DynamicNavGraph

Parameters
<T : Any>

the graph's unique route as a KClass

startDestination: KClass<*>

the starting destination's route from a KClass for this NavGraph. The respective NavDestination must be added with route from a KClass in order to match.

typeMap: Map<KType<Error class: unknown class><<Error class: unknown class>>> = emptyMap()

A mapping of KType to custom NavType<*> in the T. May be empty if T does not use custom NavTypes.

builder: DynamicNavGraphBuilder.() -> Unit

Another builder for chaining.

inline fun DynamicNavGraphBuilder.navigation(
    startDestination: String,
    route: String,
    builder: DynamicNavGraphBuilder.() -> Unit
): Unit

Construct a nested DynamicGraphNavigator.DynamicNavGraph

Parameters
startDestination: String

route start destination in the graph

route: String

NavGraph route.

builder: DynamicNavGraphBuilder.() -> Unit

Another builder for chaining.