<div class='sourceset sourceset-android'>Android</div>

```kotlin
public class MutableRemoteInt
internal constructor(
    constantValueOrNull: Int? = null,
    @get:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    internal override val cacheKey: RemoteStateCacheKey,
    @get:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    internal val idProvider: (creationState: RemoteComposeCreationState) -> Long,
) :
    RemoteInt(
        constantValueOrNull = constantValueOrNull,
        arrayProvider = { creationState ->
            val id =
                creationState.getOrPutVariableId(cacheKey) {
                    Utils.idFromLong(idProvider(creationState)).toInt()
                }
            longArrayOf(id.toLong() + 0x100000000L)
        },
    ),
    MutableRemoteState<Int>
```

A mutable implementation of [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt).

## Secondary Constructors

```kotlin
internal constructor(
    id: Long
) : this(
    constantValueOrNull = null,
    cacheKey = RemoteStateIdKey(id.toInt()),
    idProvider = { _ -> id },
)
```

Constructor for [MutableRemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/MutableRemoteInt) that allows specifying an initial ID.

#### Parameters

| | |
| --- | --- |
| id | An explicit ID for this mutable integer. |

## Companion Object

#### Methods

<h2 id="createmutable-initialvalue">createMutable</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
public fun createMutable(initialValue: Int): MutableRemoteInt
```

Creates a new mutable state (allocates an ID).

#### Parameters

| | |
| --- | --- |
| initialValue | The initial value for the state. |

#### Returns

| | |
| --- | --- |
|  | A new [MutableRemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/MutableRemoteInt) instance. |