Custom
data class Custom(val customScreenName: String, val customAllowsBack: Boolean = true) : AANavigationState
Custom screen state for client-defined screens.
Use this to add app-specific screens to the navigation flow without modifying the SDK. Register transitions for your custom states via AANavigationStateMachine's additionalTransitions parameter.
Example
// Define a custom state for a payment screen
val paymentState = AANavigationState.Custom("Payment")
// Define custom action to reach it
val openPayment = AANavigationAction.Custom("OpenPayment")
// Register transition: RoutePreview --[OpenPayment]--> Payment
val transitions = mapOf(
Pair(AANavigationState.RoutePreview, openPayment) to paymentState,
Pair(paymentState, AANavigationAction.Back) to AANavigationState.RoutePreview
)Content copied to clipboard
Parameters
customScreenName
Human-readable name for logging and debugging
customAllowsBack
Whether the back button should navigate back from this screen