Progress

class Progress(fraction: Float?, val phase: String? = null)

An immutable snapshot of an operation's progress: a fraction and an optional phase label.

Holding both values in one snapshot lets a collector render a fraction and a label that belong to the same report. Equality is by value. StateFlow conflates on equals, so reporting an equal progress twice wakes no collectors.

The constructor never throws. An out-of-range fraction is clamped into 0..1, and NaN becomes indeterminate.

Constructors

Link copied to clipboard
constructor(fraction: Float?, phase: String? = null)

Properties

Link copied to clipboard

Completed fraction in 0..1, or null while the total is unknown.

Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String