Android
public class MutableRemoteLong
internal constructor(
@get:Suppress("AutoBoxing") public override val constantValueOrNull: Long?,
internal override val cacheKey: RemoteStateCacheKey,
private val idProvider: (creationState: RemoteComposeCreationState) -> Int,
) : RemoteLong(), MutableRemoteState<Long>
A mutable implementation of RemoteLong.
Parameters
| constantValueOrNull | A nullable value if this MutableRemoteLong is constant. |
Secondary Constructors
internal constructor(
id: Int
) : this(constantValueOrNull = null, cacheKey = RemoteStateIdKey(id), { id })
Constructor for MutableRemoteLong that allows specifying an optional initial ID. If no ID is provided, a new float variable ID is reserved.
Parameters
| id | An optional explicit ID for this mutable long. If null, a new ID is reserved. |
Companion Object
Methods
createMutable
Android
public fun createMutable(initialValue: Long): MutableRemoteLong
Creates a new mutable state (allocates an ID).
Parameters
| initialValue | The initial value for the state. |
Returns
| A new MutableRemoteLong instance. |