Skip to content

PropertyState

class PropertyState<T>(
    state: ComposeBlockEntityState, 
    propertyName: String, 
    mutableState: MutableState<T>
) : MutableState<T> 

A MutableState delegate that forwards writes to ComposeBlockEntityState.sendUpdatedProperty, so setting value from a composable both updates local state and pushes the change to the server.

Constructors

PropertyState

constructor(
    state: ComposeBlockEntityState, 
    propertyName: String, 
    mutableState: MutableState<T>
)

Properties

value

open override var value: T

Functions

component1

open operator override fun component1(): T

component2

open operator override fun component2(): (T) -> Unit