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

StateRecord

Snapshot local value of a state object.

Source set: Common
public abstract class StateRecord(
    /** The snapshot id of the snapshot in which the record was created. */
    internal var snapshotId: SnapshotId
)

Snapshot local value of a state object.

Functions

assign

Source set: Common
public abstract fun assign(value: StateRecord)

Copy the value into this state record from another for the same state object.

create

Source set: Common
public abstract fun create(): StateRecord

Create a new state record for the same state object. Consider also implementing the create overload that provides snapshotId for faster record construction when snapshot id is known.

create

Source set: Common
@Deprecated("Use snapshotId: Long version instead", level = DeprecationLevel.HIDDEN)
    public open fun create(snapshotId: Int): StateRecord

Create a new state record for the same state object and provided snapshotId. This allows to implement an optimized version of create to avoid accessing currentSnapshot when snapshot id is known. The default implementation provides a backwards compatible behavior, and should be overridden if StateRecord subclass supports this optimization.

create

Source set: Common
public open fun create(snapshotId: SnapshotId): StateRecord

Create a new state record for the same state object and provided snapshotId. This allows to implement an optimized version of create to avoid accessing currentSnapshot when snapshot id is known. The default implementation provides a backwards compatible behavior, and should be overridden if StateRecord subclass supports this optimization.