abstract class RemoteInt : BaseRemoteState

Known direct subclasses
MutableRemoteInt

A mutable implementation of RemoteInt.


Abstract base class for all remote integer representations.

RemoteInt represents an integer value that can be a constant, a named variable, or a dynamic expression (e.g., a bitwise OR).

Summary

Public companion functions

RemoteInt
createNamedRemoteInt(
    name: String,
    defaultValue: Int,
    domain: RemoteState.Domain
)

Creates a named RemoteInt with an initial value.

operator RemoteInt
invoke(value: Int)

Public properties

open Int?

The constant value or null if there isn't one.

Inherited properties

From androidx.compose.remote.creation.compose.state.RemoteState
open Int

The constant value held by this state.

open Boolean

Whether or not this remote state evaluates to a constant value.

Public companion functions

createNamedRemoteInt

Added in 1.0.0-alpha12
fun createNamedRemoteInt(
    name: String,
    defaultValue: Int,
    domain: RemoteState.Domain = RemoteState.Domain.User
): RemoteInt

Creates a named RemoteInt with an initial value. Named remote ints can be set via AndroidRemoteContext.setNamedInt.

Parameters
name: String

The unique name for this remote long.

defaultValue: Int

The initial Int value for the named remote int.

domain: RemoteState.Domain = RemoteState.Domain.User

The domain of the named integer (defaults to RemoteState.Domain.User).

Returns
RemoteInt

A RemoteInt representing the named int.

invoke

Added in 1.0.0-alpha12
operator fun invoke(value: Int): RemoteInt

Public properties

constantValueOrNull

open val constantValueOrNullInt?

The constant value or null if there isn't one.