ContractCallProgressState

Holder for the contract-call stage stream. Pass report straight to a contract call's onProgress, render stage with ContractCallProgressBar, and call clear when the call finishes (typically in a finally).

val progress = rememberContractCallProgress()
// in a coroutine:
try {
contract.call("post", message, onProgress = progress::report)
} finally {
progress.clear()
}
// in the composable tree:
ContractCallProgressBar(progress.stage, accent = MyColors.Post)

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun clear()

Clear the bar once the call completes (or fails).

Link copied to clipboard

Pass this as a contract call's onProgress.