segue o código na nova versão caso alguem precise
import 'package:http/http.dart';
import 'package:http_interceptor/http_interceptor.dart';
class LoggingInterceptor implements InterceptorContract {
@override
Future<RequestData> interceptRequest({required RequestData data}) async {
print(data.toString());
return data;
}
@override
Future<ResponseData> interceptResponse({required ResponseData data}) async {
print(data.toString());
return data;
}
}
Future<void> findAll() async {
Client client = InterceptedClient.build(interceptors: [
LoggingInterceptor()
]);
var url = Uri.parse('http://SEUIP:8080/transactions');
final Response response = await client.get(url);
print(response.body);
}