AnsweringResultHandler

Handles result passing between records in a NavigableCircuitContent.

This class manages the state needed for records to send and receive PopResults when navigating between screens. It maintains channels for each record key and tracks which results each record is expecting.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
suspend fun awaitResult(recordKey: String, resultKey: String): PopResult?

Awaits a result for a record. This suspends until a result is received or returns null if the result key doesn't match the expected key.

Link copied to clipboard
fun expectingResult(recordKey: String): Boolean

Checks if a record is expecting a result.

Link copied to clipboard
fun prepareForResult(recordKey: String, resultKey: String)

Prepares a record to receive a result with the given key.

Link copied to clipboard
fun sendResult(recordKey: String, result: PopResult)

Sends a result to a record.