SetColorMode

fun EventSchemaBuilderScope.SetColorMode(id: String = randomId(), trigger: EventTrigger, events: EventSchemaBuilderScope.() -> Unit = {}, colorMode: SetColorModeEventSchema.ColorMode = colorModeSystemDefault())

Sets the app's color mode — light, dark, or following the system setting — overriding whatever was set before. Unlike SetTheme, which swaps the Material color roles themselves, this only decides which of the already-installed light/dark schemes is active. Does not consume incomingData. Dispatches onSuccess (no data) always, after the color mode is applied.

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 trigger (onSuccess).

colorMode