CheckForReceivedData

fun EventSchemaBuilderScope.CheckForReceivedData(id: String = randomId(), trigger: EventTrigger, events: EventSchemaBuilderScope.() -> Unit = {}, dataKey: String)

Reads a one-shot value from the client's DataMailer under dataKey and branches on whether it was there — the receiving half of a SendData/CheckForReceivedData handoff between screens. Does not consume incomingData. Dispatches onDataReceived and onSuccess (both carrying the value) when a value exists for dataKey; onFailure (no data) when none does.

Parameters

id

Unique identifier of this event. Defaults to a random id.

trigger

Trigger that fires this event, built via EventTriggers.

events

Child events chained after this one, wired to its triggers (onDataReceived, onSuccess, onFailure).

dataKey

Mailer key to check, matching the dataKey a SendData posted under.