# SavedStateWriter

Artifact: [androidx.savedstate:savedstate](https://developer.android.com/jetpack/androidx/releases/savedstate) [View Source](https://cs.android.com/search?q=file:androidx/savedstate/SavedStateWriter.+class:androidx.savedstate.SavedStateWriter) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/savedstate#1.3.0)

*** ** * ** ***


```
value public final class SavedStateWriter
```

<br />

*** ** * ** ***

An inline class that encapsulates an opaque `https://developer.android.com/reference/androidx/savedstate/SavedState`, and provides an API for writing the platform specific state.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/savedstate/package-summary#(androidx.savedstate.SavedState).write(kotlin.Function1)` |   |

## Summary

| ### Public methods |
|---|---|
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#clear()()` Removes all key-value pairs from the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putAll(android.os.Bundle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html from)` Stores all key-value pairs from the provided `https://developer.android.com/reference/androidx/savedstate/SavedState` into this `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putBinder(kotlin.String,android.os.IBinder)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/IBinder.html value)` Stores an `https://developer.android.com/reference/android/os/IBinder.html` value associated with the specified key in the `https://developer.android.com/reference/android/os/IBinder.html`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putBoolean(kotlin.String,kotlin.Boolean)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, boolean value)` Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` value associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putBooleanArray(kotlin.String,kotlin.BooleanArray)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull boolean[] value)` Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean-array/index.html` associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putChar(kotlin.String,kotlin.Char)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, char value)` Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char/index.html` value associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putCharArray(kotlin.String,kotlin.CharArray)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull char[] value)` Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-array/index.html` associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putCharSequence(kotlin.String,kotlin.CharSequence)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html value)` Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` value associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putCharSequenceArray(kotlin.String,kotlin.Array)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull CharSequence[] value)` Stores an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html` of `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` values associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putCharSequenceList(kotlin.String,kotlin.collections.List)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html> value )` Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` values associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putDouble(kotlin.String,kotlin.Double)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, double value)` Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html` value associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putDoubleArray(kotlin.String,kotlin.DoubleArray)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull double[] value)` Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double-array/index.html` associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putFloat(kotlin.String,kotlin.Float)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, float value)` Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` value associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putFloatArray(kotlin.String,kotlin.FloatArray)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull float[] value)` Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html` associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putInt(kotlin.String,kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, int value)` Stores an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` value associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putIntArray(kotlin.String,kotlin.IntArray)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull int[] value)` Stores an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html` associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putIntList(kotlin.String,kotlin.collections.List)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html> value)` Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` values associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `<T extends https://developer.android.com/reference/java/io/Serializable.html> https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putJavaSerializable(kotlin.String,java.io.Serializable)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull T value)` Stores an `https://developer.android.com/reference/java/io/Serializable.html` value associated with the specified key in the `https://developer.android.com/reference/java/io/Serializable.html`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putLong(kotlin.String,kotlin.Long)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, long value)` Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` value associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putLongArray(kotlin.String,kotlin.LongArray)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull long[] value)` Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html` associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putNull(kotlin.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key)` Stores a `null` reference associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `<T extends https://developer.android.com/reference/android/os/Parcelable.html> https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putParcelable(kotlin.String,android.os.Parcelable)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull T value)` Stores an `https://developer.android.com/reference/android/os/Parcelable.html` value associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `<T extends https://developer.android.com/reference/android/os/Parcelable.html> https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putParcelableArray(kotlin.String,kotlin.Array)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull T[] value)` Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html` of elements of `https://developer.android.com/reference/android/os/Parcelable.html` associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `<T extends https://developer.android.com/reference/android/os/Parcelable.html> https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putParcelableList(kotlin.String,kotlin.collections.List)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull T> value )` Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of elements of `https://developer.android.com/reference/android/os/Parcelable.html` associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putSavedState(kotlin.String,android.os.Bundle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html value)` Stores a `https://developer.android.com/reference/androidx/savedstate/SavedState` object associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putSavedStateArray(kotlin.String,kotlin.Array)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull Bundle[] value)` Stores an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html` of `https://developer.android.com/reference/androidx/savedstate/SavedState` values associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putSavedStateList(kotlin.String,kotlin.collections.List)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html> value)` Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://developer.android.com/reference/androidx/savedstate/SavedState` values associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putSize(kotlin.String,android.util.Size)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Size.html value)` Stores an `https://developer.android.com/reference/android/util/Size.html` value associated with the specified key in the `https://developer.android.com/reference/android/util/Size.html`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putSizeF(kotlin.String,android.util.SizeF)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/SizeF.html value)` Stores an `https://developer.android.com/reference/android/util/SizeF.html` value associated with the specified key in the `https://developer.android.com/reference/android/util/SizeF.html`. |
| `final void` | `<T extends https://developer.android.com/reference/android/os/Parcelable.html> https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putSparseParcelableArray(kotlin.String,android.util.SparseArray)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/SparseArray.html<@https://developer.android.com/reference/androidx/annotation/NonNull T> value )` Stores a `https://developer.android.com/reference/android/util/SparseArray.html` of elements of `https://developer.android.com/reference/android/os/Parcelable.html` associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putString(kotlin.String,kotlin.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html value)` Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` value associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putStringArray(kotlin.String,kotlin.Array)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull String[] value)` Stores an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html` of `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` values associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#putStringList(kotlin.String,kotlin.collections.List)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html> value)` Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` values associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#remove(kotlin.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key)` Removes the value associated with the specified key from the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |

| ### Extension functions |
|---|---|
| `final void` | `<T extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/savedstate/SavedStateKt.https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#(androidx.savedstate.SavedStateWriter).putKotlinSerializable(kotlin.String,kotlin.Any,androidx.savedstate.serialization.SavedStateConfiguration)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/savedstate/SavedStateWriter receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull T value, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/savedstate/serialization/SavedStateConfiguration configuration )` Stores a `https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-core/kotlinx.serialization/-serializable/index.html` value associated with the specified `https://developer.android.com/reference/androidx/savedstate/package-summary#(androidx.savedstate.SavedStateWriter).putKotlinSerializable(kotlin.String,kotlin.Any,androidx.savedstate.serialization.SavedStateConfiguration)` in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |
| `final void` | `<T extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/savedstate/SavedStateKt.https://developer.android.com/reference/androidx/savedstate/SavedStateWriter#(androidx.savedstate.SavedStateWriter).putKotlinSerializable(kotlinx.serialization.KSerializer,kotlin.String,kotlin.Any,androidx.savedstate.serialization.SavedStateConfiguration)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/savedstate/SavedStateWriter receiver, @https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-core/kotlinx.serialization/-k-serializer/index.html<@https://developer.android.com/reference/androidx/annotation/NonNull T> serializer, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull T value, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/savedstate/serialization/SavedStateConfiguration configuration )` Stores a `https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-core/kotlinx.serialization/-serializable/index.html` value associated with the specified `https://developer.android.com/reference/androidx/savedstate/package-summary#(androidx.savedstate.SavedStateWriter).putKotlinSerializable(kotlinx.serialization.KSerializer,kotlin.String,kotlin.Any,androidx.savedstate.serialization.SavedStateConfiguration)` in the `https://developer.android.com/reference/androidx/savedstate/SavedState`. |

## Public methods

### clear

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

```
public final void clear()
```

Removes all key-value pairs from the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

### putAll

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

```
public final void putAll(@NonNull Bundle from)
```

Stores all key-value pairs from the provided `https://developer.android.com/reference/androidx/savedstate/SavedState` into this `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html from` | The `https://developer.android.com/reference/androidx/savedstate/SavedState` containing the key-value pairs to add. |

### putBinder

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

```
public final void putBinder(@NonNull String key, @NonNull IBinder value)
```

Stores an `https://developer.android.com/reference/android/os/IBinder.html` value associated with the specified key in the `https://developer.android.com/reference/android/os/IBinder.html`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/IBinder.html value` | The `https://developer.android.com/reference/android/os/IBinder.html` value to store. |

### putBoolean

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

```
public final void putBoolean(@NonNull String key, boolean value)
```

Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` value associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `boolean value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` value to store. |

### putBooleanArray

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

```
public final void putBooleanArray(@NonNull String key, @NonNull boolean[] value)
```

Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean-array/index.html` associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull boolean[] value` | The array of elements to store. |

### putChar

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

```
public final void putChar(@NonNull String key, char value)
```

Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char/index.html` value associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `char value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char/index.html` value to store. |

### putCharArray

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

```
public final void putCharArray(@NonNull String key, @NonNull char[] value)
```

Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-array/index.html` associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull char[] value` | The array of elements to store. |

### putCharSequence

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

```
public final void putCharSequence(@NonNull String key, @NonNull CharSequence value)
```

Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` value associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` value to store. |

### putCharSequenceArray

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

```
public final void putCharSequenceArray(@NonNull String key, @NonNull CharSequence[] value)
```

Stores an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html` of `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` values associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull CharSequence[] value` | The array of elements to store. |

### putCharSequenceList

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

```
public final void putCharSequenceList(
    @NonNull String key,
    @NonNull List<@NonNull CharSequence> value
)
```

Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` values associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html> value` | The list of elements to store. |

### putDouble

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

```
public final void putDouble(@NonNull String key, double value)
```

Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html` value associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `double value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html` value to store. |

### putDoubleArray

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

```
public final void putDoubleArray(@NonNull String key, @NonNull double[] value)
```

Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double-array/index.html` associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull double[] value` | The array of elements to store. |

### putFloat

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

```
public final void putFloat(@NonNull String key, float value)
```

Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` value associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `float value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` value to store. |

### putFloatArray

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

```
public final void putFloatArray(@NonNull String key, @NonNull float[] value)
```

Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html` associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull float[] value` | The array of elements to store. |

### putInt

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

```
public final void putInt(@NonNull String key, int value)
```

Stores an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` value associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `int value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` value to store. |

### putIntArray

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

```
public final void putIntArray(@NonNull String key, @NonNull int[] value)
```

Stores an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html` associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull int[] value` | The array of elements to store. |

### putIntList

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

```
public final void putIntList(@NonNull String key, @NonNull List<@NonNull Integer> value)
```

Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` values associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html> value` | The list of elements to store. |

### putJavaSerializable

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

```
public final void <T extends Serializable> putJavaSerializable(@NonNull String key, @NonNull T value)
```

Stores an `https://developer.android.com/reference/java/io/Serializable.html` value associated with the specified key in the `https://developer.android.com/reference/java/io/Serializable.html`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull T value` | The `https://developer.android.com/reference/java/io/Serializable.html` value to store. |

### putLong

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

```
public final void putLong(@NonNull String key, long value)
```

Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` value associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `long value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` value to store. |

### putLongArray

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

```
public final void putLongArray(@NonNull String key, @NonNull long[] value)
```

Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html` associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull long[] value` | The array of elements to store. |

### putNull

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

```
public final void putNull(@NonNull String key)
```

Stores a `null` reference associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the `null` reference. |

### putParcelable

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

```
public final void <T extends Parcelable> putParcelable(@NonNull String key, @NonNull T value)
```

Stores an `https://developer.android.com/reference/android/os/Parcelable.html` value associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull T value` | The `https://developer.android.com/reference/android/os/Parcelable.html` value to store. |

### putParcelableArray

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

```
public final void <T extends Parcelable> putParcelableArray(@NonNull String key, @NonNull T[] value)
```

Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html` of elements of `https://developer.android.com/reference/android/os/Parcelable.html` associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull T[] value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html` of elements to store. |

### putParcelableList

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

```
public final void <T extends Parcelable> putParcelableList(
    @NonNull String key,
    @NonNull List<@NonNull T> value
)
```

Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of elements of `https://developer.android.com/reference/android/os/Parcelable.html` associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull T> value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of elements to store. |

### putSavedState

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

```
public final void putSavedState(@NonNull String key, @NonNull Bundle value)
```

Stores a `https://developer.android.com/reference/androidx/savedstate/SavedState` object associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html value` | The `https://developer.android.com/reference/androidx/savedstate/SavedState` object to store. |

### putSavedStateArray

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

```
public final void putSavedStateArray(@NonNull String key, @NonNull Bundle[] value)
```

Stores an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html` of `https://developer.android.com/reference/androidx/savedstate/SavedState` values associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull Bundle[] value` | The array of elements to store. |

### putSavedStateList

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

```
public final void putSavedStateList(@NonNull String key, @NonNull List<@NonNull Bundle> value)
```

Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://developer.android.com/reference/androidx/savedstate/SavedState` values associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Bundle.html> value` | The list of elements to store. |

### putSize

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

```
public final void putSize(@NonNull String key, @NonNull Size value)
```

Stores an `https://developer.android.com/reference/android/util/Size.html` value associated with the specified key in the `https://developer.android.com/reference/android/util/Size.html`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Size.html value` | The `https://developer.android.com/reference/android/util/Size.html` value to store. |

### putSizeF

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

```
public final void putSizeF(@NonNull String key, @NonNull SizeF value)
```

Stores an `https://developer.android.com/reference/android/util/SizeF.html` value associated with the specified key in the `https://developer.android.com/reference/android/util/SizeF.html`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/SizeF.html value` | The `https://developer.android.com/reference/android/util/SizeF.html` value to store. |

### putSparseParcelableArray

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

```
public final void <T extends Parcelable> putSparseParcelableArray(
    @NonNull String key,
    @NonNull SparseArray<@NonNull T> value
)
```

Stores a `https://developer.android.com/reference/android/util/SparseArray.html` of elements of `https://developer.android.com/reference/android/os/Parcelable.html` associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/SparseArray.html<@https://developer.android.com/reference/androidx/annotation/NonNull T> value` | The `https://developer.android.com/reference/android/util/SparseArray.html` of elements to store. |

### putString

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

```
public final void putString(@NonNull String key, @NonNull String value)
```

Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` value associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` value to store. |

### putStringArray

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

```
public final void putStringArray(@NonNull String key, @NonNull String[] value)
```

Stores an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html` of `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` values associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull String[] value` | The array of elements to store. |

### putStringList

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

```
public final void putStringList(@NonNull String key, @NonNull List<@NonNull String> value)
```

Stores a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` values associated with the specified key in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html> value` | The list of elements to store. |

### remove

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

```
public final void remove(@NonNull String key)
```

Removes the value associated with the specified key from the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to remove. |

## Extension functions

### SavedStateKt.putKotlinSerializable

Artifact: [androidx.savedstate:savedstate](https://developer.android.com/jetpack/androidx/releases/savedstate) [View Source](https://cs.android.com/search?q=file:androidx/savedstate/SavedState.kt+function:putKotlinSerializable)

```
public final void <T extends Object> SavedStateKt.putKotlinSerializable(
    @NonNull SavedStateWriter receiver,
    @NonNull String key,
    @NonNull T value,
    @NonNull SavedStateConfiguration configuration
)
```

Stores a `https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-core/kotlinx.serialization/-serializable/index.html` value associated with the specified `https://developer.android.com/reference/androidx/savedstate/package-summary#(androidx.savedstate.SavedStateWriter).putKotlinSerializable(kotlin.String,kotlin.Any,androidx.savedstate.serialization.SavedStateConfiguration)` in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull T value` | The `https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-core/kotlinx.serialization/-serializable/index.html` value to store. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/savedstate/serialization/SavedStateConfiguration configuration` | The `https://developer.android.com/reference/androidx/savedstate/serialization/SavedStateConfiguration` to use for the encoding process. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/savedstate/serialization/package-summary#encodeToSavedState(kotlin.Any,androidx.savedstate.serialization.SavedStateConfiguration)` |   |

### SavedStateKt.putKotlinSerializable

Artifact: [androidx.savedstate:savedstate](https://developer.android.com/jetpack/androidx/releases/savedstate) [View Source](https://cs.android.com/search?q=file:androidx/savedstate/SavedState.kt+function:putKotlinSerializable)

```
public final void <T extends Object> SavedStateKt.putKotlinSerializable(
    @NonNull SavedStateWriter receiver,
    @NonNull KSerializer<@NonNull T> serializer,
    @NonNull String key,
    @NonNull T value,
    @NonNull SavedStateConfiguration configuration
)
```

Stores a `https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-core/kotlinx.serialization/-serializable/index.html` value associated with the specified `https://developer.android.com/reference/androidx/savedstate/package-summary#(androidx.savedstate.SavedStateWriter).putKotlinSerializable(kotlinx.serialization.KSerializer,kotlin.String,kotlin.Any,androidx.savedstate.serialization.SavedStateConfiguration)` in the `https://developer.android.com/reference/androidx/savedstate/SavedState`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-core/kotlinx.serialization/-k-serializer/index.html<@https://developer.android.com/reference/androidx/annotation/NonNull T> serializer` | The `https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-core/kotlinx.serialization/-k-serializer/index.html` used to encode the value. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to associate the value with. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull T value` | The `https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-core/kotlinx.serialization/-serializable/index.html` value to store. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/savedstate/serialization/SavedStateConfiguration configuration` | The `https://developer.android.com/reference/androidx/savedstate/serialization/SavedStateConfiguration` to use for the encoding process. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/savedstate/serialization/package-summary#encodeToSavedState(kotlin.Any,androidx.savedstate.serialization.SavedStateConfiguration)` |   |