captureProgress¶
@ExperimentalProgressApi
fun <Value> Flow<Value>.captureProgress(): Flow<Progressive<Value?>>
Captures calls to report within the given flow and reports them as a new Flow.
Emissions¶
Each report call inside the initial flow leads to a new emitted value in the downstream flow, with a Progressive.value of null. All emissions in the initial flow leads to a new emitted value in the downstream flow, with the emission as Progressive.value and a Progressive.progress of done.
@ExperimentalProgressApi
fun <Value> captureProgress(block: suspend () -> Value): Flow<Progressive<Value?>>