consumeAsFlow

fun consumeAsFlow(): Flow<E>

Converts this receiver into Flow. The receiver is automatically closed after the flow is collected.