field

Finds a mutable field by its label in the PreviewLabState, throwing an error if not found.

Return

The field if found and matches the type

Parameters

Value

The type of the field's value

label

The label of the field to find

Throws

if the field is not found

Example:

val intField by state.field<Int>("intValue")
intField.value = 42