# DialogFragmentNavigatorDestinationBuilder

Artifact: [androidx.navigation:navigation-fragment](https://developer.android.com/jetpack/androidx/releases/navigation) [View Source](https://cs.android.com/search?q=file:androidx/navigation/fragment/DialogFragmentNavigatorDestinationBuilder.kt+class:androidx.navigation.fragment.DialogFragmentNavigatorDestinationBuilder) Added in [2.4.0](https://developer.android.com/jetpack/androidx/releases/navigation#2.4.0)

*** ** * ** ***


```
@NavDestinationDsl
public final class DialogFragmentNavigatorDestinationBuilder extends NavDestinationBuilder<@NonNull DialogFragmentNavigator.Destination>
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.navigation.NavDestinationBuilder](https://developer.android.com/reference/androidx/navigation/NavDestinationBuilder)\<@[NonNull](https://developer.android.com/reference/androidx/annotation/NonNull) [DialogFragmentNavigator.Destination](https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigator.Destination)\> ||
|   | ↳ | [androidx.navigation.fragment.DialogFragmentNavigatorDestinationBuilder](https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigatorDestinationBuilder) |

*** ** * ** ***

DSL for constructing a new `https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigator.Destination`

## Summary

| ### Public constructors |
|---|
| `[DialogFragmentNavigatorDestinationBuilder](https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigatorDestinationBuilder#DialogFragmentNavigatorDestinationBuilder(androidx.navigation.fragment.DialogFragmentNavigator,kotlin.Int,kotlin.reflect.KClass))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigator navigator, @https://developer.android.com/reference/androidx/annotation/IdRes int id, @https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.reflect/-k-class/index.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/fragment/app/DialogFragment> fragmentClass )` **This method is deprecated.** Use routes to build your DialogFragmentNavigatorDestination instead |
| `https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigatorDestinationBuilder#DialogFragmentNavigatorDestinationBuilder(androidx.navigation.fragment.DialogFragmentNavigator,kotlin.String,kotlin.reflect.KClass)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigator navigator, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html route, @https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.reflect/-k-class/index.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/fragment/app/DialogFragment> fragmentClass )` DSL for constructing a new `https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigator.Destination` |
| `https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigatorDestinationBuilder#DialogFragmentNavigatorDestinationBuilder(androidx.navigation.fragment.DialogFragmentNavigator,kotlin.reflect.KClass,kotlin.collections.Map,kotlin.reflect.KClass)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigator navigator, @https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.reflect/-k-class/index.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Object.html> route, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.reflect/-k-type/index.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/NavType<@https://developer.android.com/reference/androidx/annotation/NonNull ?>> typeMap, @https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.reflect/-k-class/index.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/fragment/app/DialogFragment> fragmentClass )` DSL for constructing a new `https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigator.Destination` |

| ### Public methods |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigator.Destination` | `https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigatorDestinationBuilder#build()()` |

### Inherited methods

From [androidx.navigation.NavDestinationBuilder](https://developer.android.com/reference/androidx/navigation/NavDestinationBuilder) `final void` `[action](https://developer.android.com/reference/androidx/navigation/NavDestinationBuilder#action(kotlin.Int,kotlin.Function1))(
int actionId,
@https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/NavActionBuilder, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> actionBuilder
)`

**This method is deprecated.** Building NavDestinations using IDs with the Kotlin DSL has been deprecated in favor of using routes.
`final void` `https://developer.android.com/reference/androidx/navigation/NavDestinationBuilder#argument(kotlin.String,kotlin.Function1)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name,
@https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/NavArgumentBuilder, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> argumentBuilder
)` `final void` `https://developer.android.com/reference/androidx/navigation/NavDestinationBuilder#argument(kotlin.String,androidx.navigation.NavArgument)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html name, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/NavArgument argument)` `final void` `<T extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/navigation/NavDestinationBuilder#deepLinkSafeArgs(kotlin.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html basePath)` `final void` `https://developer.android.com/reference/androidx/navigation/NavDestinationBuilder#deepLink(kotlin.Function1)(
@https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/NavDeepLinkDslBuilder, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> navDeepLink
)` `final void` `https://developer.android.com/reference/androidx/navigation/NavDestinationBuilder#deepLink(androidx.navigation.NavDeepLink)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/NavDeepLink navDeepLink)` `final void` `https://developer.android.com/reference/androidx/navigation/NavDestinationBuilder#deepLink(kotlin.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html uriPattern)` `final void` `<T extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/navigation/NavDestinationBuilder#deepLink(kotlin.String,kotlin.Function1)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html basePath,
@https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/NavDeepLinkDslBuilder, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> navDeepLink
)` `final void` `<T extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/navigation/NavDestinationBuilder#deepLink(kotlin.reflect.KClass,kotlin.String,kotlin.Function1)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.reflect/-k-class/index.html<@https://developer.android.com/reference/androidx/annotation/NonNull T> route,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html basePath,
@https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/NavDeepLinkDslBuilder, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> navDeepLink
)` `final int` `https://developer.android.com/reference/androidx/navigation/NavDestinationBuilder#getId()()` `final https://developer.android.com/reference/java/lang/CharSequence.html` `https://developer.android.com/reference/androidx/navigation/NavDestinationBuilder#getLabel()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/Navigator<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigator.Destination>` `https://developer.android.com/reference/androidx/navigation/NavDestinationBuilder#getNavigator()()`

DSL for constructing a new `https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigator.Destination`
`final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/navigation/NavDestinationBuilder#getRoute()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigator.Destination` `https://developer.android.com/reference/androidx/navigation/NavDestinationBuilder#instantiateDestination()()` `final void` `https://developer.android.com/reference/androidx/navigation/NavDestinationBuilder#setLabel(kotlin.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence.html value)`

## Public constructors

### DialogFragmentNavigatorDestinationBuilder

Added in [2.4.0](https://developer.android.com/jetpack/androidx/releases/navigation#2.4.0) Deprecated in [2.4.0](https://developer.android.com/jetpack/androidx/releases/navigation#2.4.0)

```
public [DialogFragmentNavigatorDestinationBuilder](https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigatorDestinationBuilder#DialogFragmentNavigatorDestinationBuilder(androidx.navigation.fragment.DialogFragmentNavigator,kotlin.Int,kotlin.reflect.KClass))(
    @NonNull DialogFragmentNavigator navigator,
    @IdRes int id,
    @NonNull KClass<@NonNull DialogFragment> fragmentClass
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Use routes to build your DialogFragmentNavigatorDestination instead, use this instead:
>
> ```
> DialogFragmentNavigatorDestinationBuilder(navigator, route = id.toString(), fragmentClass) 
> ```

DSL for constructing a new `https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigator.Destination`

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigator navigator` | navigator used to create the destination |
| `@https://developer.android.com/reference/androidx/annotation/IdRes int id` | the destination's unique id |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.reflect/-k-class/index.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/fragment/app/DialogFragment> fragmentClass` | the class name of the DialogFragment to show when you navigate to this destination |

### DialogFragmentNavigatorDestinationBuilder

Added in [2.4.0](https://developer.android.com/jetpack/androidx/releases/navigation#2.4.0)

```
public DialogFragmentNavigatorDestinationBuilder(
    @NonNull DialogFragmentNavigator navigator,
    @NonNull String route,
    @NonNull KClass<@NonNull DialogFragment> fragmentClass
)
```

DSL for constructing a new `https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigator.Destination`

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigator navigator` | navigator used to create the destination |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html route` | the destination's unique route. This sets the `https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigatorDestinationBuilder#(androidx.navigation.fragment.DialogFragmentNavigator,kotlin.String,kotlin.reflect.KClass)` on the newly constructed `https://developer.android.com/reference/androidx/navigation/NavDestination`. This can be any valid non-empty String. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.reflect/-k-class/index.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/fragment/app/DialogFragment> fragmentClass` | the class name of the DialogFragment to show when you navigate to this destination |

### DialogFragmentNavigatorDestinationBuilder

```
public DialogFragmentNavigatorDestinationBuilder(
    @NonNull DialogFragmentNavigator navigator,
    @NonNull KClass<@NonNull Object> route,
    @NonNull Map<@NonNull KType, @NonNull NavType<@NonNull ?>> typeMap,
    @NonNull KClass<@NonNull DialogFragment> fragmentClass
)
```

DSL for constructing a new `https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigator.Destination`

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigator navigator` | navigator used to create the destination |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.reflect/-k-class/index.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Object.html> route` | the destination's unique route from a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.reflect/-k-class/index.html`. This sets the `https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigatorDestinationBuilder#(androidx.navigation.fragment.DialogFragmentNavigator,kotlin.reflect.KClass,kotlin.collections.Map,kotlin.reflect.KClass)` on the newly constructed `https://developer.android.com/reference/androidx/navigation/NavDestination`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.reflect/-k-type/index.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/NavType<@https://developer.android.com/reference/androidx/annotation/NonNull ?>> typeMap` | map of destination arguments' kotlin type `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.reflect/-k-type/index.html` to its respective custom `https://developer.android.com/reference/androidx/navigation/NavType`. May be empty if `https://developer.android.com/reference/androidx/navigation/fragment/DialogFragmentNavigatorDestinationBuilder#(androidx.navigation.fragment.DialogFragmentNavigator,kotlin.reflect.KClass,kotlin.collections.Map,kotlin.reflect.KClass)` does not use custom NavTypes. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.reflect/-k-class/index.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/fragment/app/DialogFragment> fragmentClass` | the class name of the DialogFragment to show when you navigate to this destination |

## Public methods

### build

Added in [2.4.0](https://developer.android.com/jetpack/androidx/releases/navigation#2.4.0)

```
public @NonNull DialogFragmentNavigator.Destination build()
```