asApiResult

inline fun <T> Flow<T>.asApiResult(): Flow<ApiResult<T>>

Emits Loading before this flow starts to be collected. Then maps all results to their values, then catches Exceptions and maps them to Errors

See also