onResponse method

  1. @override
FutureOr onResponse(
  1. Response response,
  2. ResponseInterceptorHandler handler
)

The callback will be executed on success.

Implementation

@override
FutureOr<dynamic> onResponse(
  Response response,
  ResponseInterceptorHandler handler,
) {
  if (response.data is! Uint8List) {
    loggy.debug('\nRESPONSE:\n${response.data}');
  } else {
    loggy.debug('\nRESPONSE:\n<Uint8List>');
  }

  super.onResponse(response, handler);
}