getResult method
Implementation
T getResult(BaseServiceRequestParams params) {
return switch (type) {
ServiceResponseType.error => throw RPCError(
message: ServiceConst.httpErrorMessages[statusCode] ??
"Unknown Error${statusCode == 200 ? '' : ' $statusCode'}: An unexpected error occurred.",
errorCode: null,
request: params.toJson(),
details: ServiceProviderUtils.findErrorDetails(
statusCode: statusCode,
object: cast<ServiceErrorResponse>().error)),
ServiceResponseType.success => cast<ServiceSuccessRespose<T>>().response
};
}