orNull

inline fun <T> ApiResult<T>?.orNull(): T?

Return

null if this is an ApiResult.Error or ApiResult.Loading, otherwise return self.


fun <T> Flow<ApiResult<T>>.orNull(): Flow<T?>

Maps this flow to an ApiResult.Success value, otherwise the value is null