onResponse method
Called when the response is about to be resolved.
Implementation
@override
void onResponse(Response response, ResponseInterceptorHandler handler) {
if (kDebugMode) {
print("Api: ${response.requestOptions.path}");
print("Request Params: ${response.requestOptions.data}");
print("Api Response: ${response.statusCode}");
print("Response: ${jsonEncode(response.data)}");
}
super.onResponse(response, handler);
}