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.

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
@get:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public val asEncoded: RemoteState<*>

Last updated: