🌈 Create new beautiful Compose Gradients with our new wesite ->
Class

MutableRemoteInt

A mutable implementation of RemoteInt.

Source set: Android
public class MutableRemoteInt internal constructor(
    constantValueOrNull: Int? = null,
    cacheKey: RemoteStateCacheKey,
    internal val idProvider: (creationState: RemoteComposeCreationState) -> Long,
) :
    RemoteInt(
        constantValueOrNull = constantValueOrNull,
        cacheKey = cacheKey,
        arrayProvider = { creationState ->
            val id =
                creationState.getOrPutVariableId(cacheKey) {
                    Utils.idFromLong(idProvider(creationState)).toInt()
                }
            longArrayOf(id.toLong() + 0x100000000L)
        },
    ),
    MutableRemoteState<Int>

A mutable implementation of RemoteInt.

Members

Companion

Source set: Android
public companion object

Constructor for MutableRemoteInt that allows specifying an initial ID.

Parameters

id An explicit ID for this mutable integer.

Functions

invoke

Source set: Android
public operator fun invoke(initialValue: Int): MutableRemoteInt

Creates a new mutable state (allocates an ID).

Parameters

initialValue The initial value for the state.

Return

A new MutableRemoteInt instance.

Content updated: