dio_http_logger 1.0.1
dio_http_logger: ^1.0.1 copied to clipboard
Dio network logger library for viewing request, response and error logs for any requests
dio_http_logger #
A powerful network interceptor for Dio, providing comprehensive logging of requests, responses and errors.
⚡ Screenshots #
![]() |
![]() |
![]() |
![]() |
![]() |
|---|
⚡Features #
- Detailed Logging: Log request method, URL, headers, query parameters, request body, response status code, headers, request time, response time, request data size, response data size and response body.
- Error stack-trace: Stack trace data directly from Dio in error requests.
- Easy Integration: Add the interceptor to your Dio instance with just a few lines of code.
⚡Installation #
Add dio_http_logger to your pubspec.yaml file:
dependencies:
dio: ">=4.0.0 <6.0.0" //use the latest version
.....
dio_http_logger: ^latest_version
⚡Getting Started #
- Add
DioNetworkLogger.instance.dioNetworkInterceptorto your dio object/instances.
final client = Dio();
client.interceptors.add(DioNetworkLogger.instance.dioNetworkInterceptor!);
- Use
DioNetworkLogger.instance.overLayButtonWidgetwidget to direct navigate to the library (Use it at the root view of your application, this will make the button appear in every screen).
runApp(
MaterialApp(
home: Stack(
children: [
const MyApp(),
DioNetworkLogger.instance.overLayButtonWidget
],
),
)
);
- Or you can use
DioNetworkLogger.instance.startNetworkLoggerScreen()to direct navigate to the library
//Use it on any callback
onPressed: () {
DioNetworkLogger.instance.startNetworkLoggerScreen();
},




