# MetadataScope

Artifact: [androidx.navigation3:navigation3-runtime](https://developer.android.com/jetpack/androidx/releases/navigation3) [View Source](https://cs.android.com/search?q=file:androidx/navigation3/runtime/NavMetadata.kt+class:androidx.navigation3.runtime.MetadataScope) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/navigation3#1.1.0) Common/AllAndroid/JVM
- Cmn

  ```
  @MetadataDsl
  class MetadataScope
  ```

*** ** * ** ***

Scope provided to the metadata dsl builder.

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/MetadataScope#MetadataScope()()` | Cmn |

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `<K : https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/NavMetadataKey<T>, T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/MetadataScope#put(androidx.navigation3.runtime.NavMetadataKey,kotlin.Any)(key: K, value: T)` Adds the key and value pair to the map of metadata. | Cmn |

## Public constructors

### MetadataScope

Cmn Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/navigation3#1.1.0)

```
MetadataScope()
```

## Public functions

### put

Cmn Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/navigation3#1.1.0)

```
fun <K : NavMetadataKey<T>, T : Any> put(key: K, value: T): Unit
```

Adds the key and value pair to the map of metadata.

`https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/MetadataScope#put(androidx.navigation3.runtime.NavMetadataKey,kotlin.Any)` the `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/MetadataScope#put(androidx.navigation3.runtime.NavMetadataKey,kotlin.Any)` type. `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/MetadataScope#put(androidx.navigation3.runtime.NavMetadataKey,kotlin.Any)` the key for a value of type `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/MetadataScope#put(androidx.navigation3.runtime.NavMetadataKey,kotlin.Any)`.

| Parameters |
|---|---|
| `key: K` | the key associated with the `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/MetadataScope#put(androidx.navigation3.runtime.NavMetadataKey,kotlin.Any)` |
| `value: T` | the data to be added to the map of metadata |