SwitchTileSchema

@Serializable
@SerialName(value = "Switch")
data class SwitchTileSchema(val id: String, val events: SerializableImmutableList<EventSchema>?, val style: StyleSchema, val searchableTerms: SerializableImmutableList<String>?, val visibility: TileSchema.Visibility, val checked: Boolean, val enabled: Boolean) : TileSchema

Renders a bare Material 3 Switch reflecting checked. enabled is forwarded to the composable. The tile draws only the switch — no label or thumb icon is rendered, so pair it with a SimpleText inside a Row when a caption is needed.

Selection: toggling the switch dispatches a local SwitchTileEvents.OnCheckChanged that the holder applies to its own state, so the new value survives without a round trip to the server.

Triggers dispatched (in this order, on every toggle):

  • OnCheckEventTrigger — when the switch turns on.

  • OnUncheckEventTrigger — when the switch turns off.

  • OnCheckChangedEventTrigger — always, right after one of the two above.

Value production: the holder exposes the current checked boolean under a caller-chosen key, so GetData / EvaluateData events can read this switch by its id.

Constructors

Link copied to clipboard
constructor(id: String, events: SerializableImmutableList<EventSchema>?, style: StyleSchema, searchableTerms: SerializableImmutableList<String>?, visibility: TileSchema.Visibility, checked: Boolean, enabled: Boolean)

Properties

Link copied to clipboard
@SerialName(value = "checked")
val checked: Boolean
Link copied to clipboard
@SerialName(value = "enabled")
val enabled: Boolean
Link copied to clipboard
@SerialName(value = "events")
open override val events: SerializableImmutableList<EventSchema>?
Link copied to clipboard
@SerialName(value = "id")
open override val id: String
Link copied to clipboard
@SerialName(value = "searchableTerms")
open override val searchableTerms: SerializableImmutableList<String>?
Link copied to clipboard
@SerialName(value = "style")
open override val style: StyleSchema
Link copied to clipboard
@SerialName(value = "visibility")
open override val visibility: TileSchema.Visibility

Functions

Link copied to clipboard
open fun isGone(): Boolean
Link copied to clipboard
open fun isVisible(): Boolean