PendingNavigation

@Serializable
data class PendingNavigation(val route: String, val params: Params, val metadata: Map<String, String> = emptyMap(), val displayHint: String? = null)(source)

Stores intent to navigate to a protected route while the user is being redirected for authentication.

Placed in NavigationState.pendingNavigation by GuardResult.PendAndRedirectTo. Consumed by navigation { clearBackStack(); resumePendingNavigation() } after authentication succeeds.

Example:

val pending = navState.pendingNavigation
if (pending != null) {
val hint = pending.displayHint
if (hint != null) {
PendingActionBanner(message = hint)
}
}

Parameters

route

The canonical route the user originally tried to navigate to

params

The parameters that were passed with the original navigation

metadata

Arbitrary string key-value pairs for application use (e.g. invite tokens)

displayHint

Optional human-readable hint that can be shown during the auth flow

Constructors

Link copied to clipboard
constructor(route: String, params: Params, metadata: Map<String, String> = emptyMap(), displayHint: String? = null)

Properties

Link copied to clipboard
val displayHint: String? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard