createEnhancedResponse<T> method
Creates an enhanced API response from a Dio response and type This is a convenience method for creating NyResponse objects
Implementation
NyResponse<T> createEnhancedResponse<T>(Response response) {
T? morphedData;
if (T.toString() != 'dynamic') {
morphedData = _morphJsonResponse<T>(response.data);
} else {
morphedData = response.data as T?;
}
return NyResponse.fromResponse(
response: response,
morphedData: morphedData,
);
}