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

RemoteState

A readable but not writable Remote Compose State value.

Source set: Android
public interface RemoteState<T>

A readable but not writable Remote Compose State value.

RemoteState represents a value that is available during remote document creation. It may represent either a constant value or a dynamic expression that evaluates on the remote rendering engine.

In Remote Compose recording mode, a type-specific ID is used to refer to this state within RemoteComposeCreationState.

Parameters

T The type of the value held by this state.

Properties

hasConstantValue

Source set: Android
public val hasConstantValue: Boolean

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

If true, constantValue will return the constant value.

constantValue

Source set: Android
public val constantValue: T

The constant value held by this state.

Throws: IllegalStateException

if hasConstantValue is false.

constantValueOrNull

Source set: Android
public val constantValueOrNull: T?

The constant value held by this state, or null if the state is dynamic.

asEncoded

Source set: Android
public val asEncoded: RemoteState<*>

Members

Domain

Source set: Android
public open class Domain constructor(@get:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) public val coreDomain: String?)

Represents the domain (namespace) for named remote states.

Named states are used to identify variables that can be updated externally or shared across different parts of a remote document.

Properties

prefix

Source set: Android
public val prefix: String

A string representation of the domain followed by a colon separator, or an empty string if the domain is null. This is used to namespace named remote states.

Functions

toString

Source set: Android
override fun toString(): String

equals

Source set: Android
override fun equals(other: Any?): Boolean

hashCode

Source set: Android
override fun hashCode(): Int

Members

User

Source set: Android
public object User : Domain(RemoteDomains.USER.toString())

The default user-defined domain.

Recommended for application-specific state.

System

Source set: Android
public object System : Domain(RemoteDomains.SYSTEM.toString())

The system-defined domain, used for platform-level or framework state.

Content updated: