# BundleKt

Added in 1.1.0

*** ** * ** ***


```
public final class BundleKt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html` | `https://developer.android.com/reference/androidx/core/os/BundleKt#bundleOf()()` Returns a new empty `https://developer.android.com/reference/android/os/Bundle.html`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html` | `[bundleOf](https://developer.android.com/reference/androidx/core/os/BundleKt#bundleOf(kotlin.Array))(@https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-pair/index.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html, https://developer.android.com/reference/java/lang/Object.html>... pairs)` **This method is deprecated.** This method does not provide type safety at compile time. |

## Public methods

### bundleOf

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/os/Bundle.kt+function:bundleOf) Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/core#1.8.0)

```
public static final @NonNull Bundle bundleOf()
```

Returns a new empty `https://developer.android.com/reference/android/os/Bundle.html`.

### bundleOf

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/os/Bundle.kt+function:bundleOf)

```
public static final @NonNull Bundle [bundleOf](https://developer.android.com/reference/androidx/core/os/BundleKt#bundleOf(kotlin.Array))(@NonNull Pair<@NonNull String, Object>... pairs)
```

> [!CAUTION]
> **This method is deprecated.**   
> This method does not provide type safety at compile time. Use the platform \`Bundle\` class directly instead.

Returns a new `https://developer.android.com/reference/android/os/Bundle.html` with the given key/value pairs as elements.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | When a value is not a supported type of `https://developer.android.com/reference/android/os/Bundle.html`. |