getOrThrow

inline suspend fun <R> Flow<AsyncResult<R>>.getOrThrow(): R

Obtains the first terminal value of the flow, and if it is a Success, it returns the encapsulated value. Otherwise, it throws an exception.


inline fun <R> AsyncResult<R>.getOrThrow(): R

Returns the value if the AsyncResult is Success else returns null.