NavigateEventSchema

@Serializable
@SerialName(value = "Navigate")
data class NavigateEventSchema(val id: String, val trigger: EventTrigger, val events: SerializableImmutableList<EventSchema>?, val destination: String, val navigatorId: String, val popUpTo: NavigateEventSchema.PopUpTo?, val data: Map<String, AnySerializable>?) : EventSchema

Navigates the graph registered under navigatorId to destination, pushing it onto the back stack.

Navigation data: the destination receives the event's incomingData merged with data, with data winning on key collision. Only map-shaped incomingData contributes, and null values are dropped from both — navigation arguments are never null.

Back stack: when popUpTo is set, entries are popped up to PopUpTo.destination before the new one is pushed, inclusive or not according to PopUpTo.inclusive.

incomingData consumed: merged into the destination's navigation data when it is a map.

Triggers fired:

  • OnSuccessEventTrigger — when the navigation was performed. No data is passed downstream.

  • OnFailureEventTrigger — when no navigator is registered under navigatorId, or the navigator refused the navigation; no data is passed and the error is logged.

Constructors

Link copied to clipboard
constructor(id: String, trigger: EventTrigger, events: SerializableImmutableList<EventSchema>?, destination: String, navigatorId: String, popUpTo: NavigateEventSchema.PopUpTo?, data: Map<String, AnySerializable>?)

Types

Link copied to clipboard
@Serializable
data class PopUpTo(val destination: String, val inclusive: Boolean)

Properties

Link copied to clipboard
@SerialName(value = "data")
val data: Map<String, AnySerializable>?
Link copied to clipboard
@SerialName(value = "destination")
val destination: String
Link copied to clipboard
@SerialName(value = "events")
open override val events: SerializableImmutableList<EventSchema>?

This event's own children — each declaring, via its own trigger, which of this event's outgoing triggers runs it. null when this event declares no children.

Link copied to clipboard
@SerialName(value = "id")
open override val id: String

Unique identifier — how TriggerEvent/UpdateEvents address this event by id. Defaults to a random id when omitted from the DSL.

Link copied to clipboard
@SerialName(value = "navigatorId")
val navigatorId: String
Link copied to clipboard
@SerialName(value = "popUpTo")
val popUpTo: NavigateEventSchema.PopUpTo?
Link copied to clipboard
@SerialName(value = "trigger")
open override val trigger: EventTrigger

The condition that must occur for this event to run — matched by structural equality (data class/data object equality) against whatever trigger value fired, never by any kind of subscription or listener registry.