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
public val hasConstantValue: Boolean
Whether or not this remote state evaluates to a constant value.
If true, constantValue will return the constant value.
constantValue
public val constantValue: T
The constant value held by this state.
Throws: IllegalStateException
if hasConstantValue is false.
constantValueOrNull
public val constantValueOrNull: T?
The constant value held by this state, or null if the state is dynamic.
asEncoded
public val asEncoded: RemoteState<*>
Members
Domain
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
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
override fun toString(): String
equals
override fun equals(other: Any?): Boolean
hashCode
override fun hashCode(): Int
Members
User
public object User : Domain(RemoteDomains.USER.toString())
The default user-defined domain.
Recommended for application-specific state.
System
public object System : Domain(RemoteDomains.SYSTEM.toString())
The system-defined domain, used for platform-level or framework state.