Package-level declarations

Functions

Link copied to clipboard
fun EventSchemaBuilderScope.Navigate(id: String = randomId(), trigger: EventTrigger, events: EventSchemaBuilderScope.() -> Unit = {}, destination: String, navigatorId: String, popUpTo: NavigateEventSchema.PopUpTo? = null, data: Map<String, AnySerializable>? = null)

Navigates the graph registered under navigatorId to destination, pushing it onto the back stack. The destination receives incomingData merged with data (with data winning on key collision) as its navigation data — only map-shaped incomingData contributes, and null values are dropped from both, since navigation arguments are never null. When popUpTo is set (built with poppingUpTo), entries are popped up to that destination before the new one is pushed. Dispatches onSuccess (no data) when the navigation was performed; onFailure (no data, logged) when no navigator is registered under navigatorId or it refused the navigation.

Link copied to clipboard
fun EventSchemaBuilderScope.NavigateClearingStack(id: String = randomId(), trigger: EventTrigger, events: EventSchemaBuilderScope.() -> Unit = {}, destination: String, navigatorId: String, launchSingleTop: Boolean = true, data: Map<String, AnySerializable>? = null)

Navigates the graph registered under navigatorId to destination, clearing the whole back stack so the destination becomes the only entry — the usual move after login or logout. The destination receives incomingData merged with data (with data winning on key collision) as its navigation data — only map-shaped incomingData contributes, and null values are dropped from both, since navigation arguments are never null. launchSingleTop avoids stacking a second copy when the destination is already the current entry. Dispatches onSuccess (no data) when the navigation was performed; onFailure (no data, logged) when no navigator is registered under navigatorId or it refused the navigation.

Link copied to clipboard
fun EventSchemaBuilderScope.NavigateUp(id: String = randomId(), trigger: EventTrigger, events: EventSchemaBuilderScope.() -> Unit = {}, navigatorId: String)

Pops the back stack of the graph registered under navigatorId, going back one entry. Does not consume incomingData. Dispatches onSuccess (no data) when an entry was popped; onFailure (no data, logged) when no navigator is registered under navigatorId or there was nothing to pop.

Link copied to clipboard
fun poppingUpTo(destination: String, inclusive: Boolean): NavigateEventSchema.PopUpTo

Pops back-stack entries up to destination before the new one is pushed, feeding a Navigate event's popUpTo.