Response<T>.fromResponse constructor

Response<T>.fromResponse(
  1. Response response
)

Implementation

Response.fromResponse(Response response) {
  if (response.isSuccess)
    Response.success(response.value);
  else
    Response.error(response.errorMessage);
}