Skip to content
pubscout

dio_request_inspector

3.2.1, released 5 months ago by an unverified publisher

A HTTP inspector for Dio, which can intercept and log HTTP requests and responses.

$ flutter pub add dio_request_inspector
Source repository

What it does

Intercepts and logs HTTP requests and responses for Dio. Provides a user interface to view, filter, search, and share request details directly inside the app.

AI-written summary of version 3.2.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to debug and inspect network traffic in a Dio-based Flutter app
  • You want a built-in UI tool to view request headers, bodies, status codes, and copy data to cURL

Skip it when

  • You are not using Dio for networking
  • You prefer external network proxy tools like Charles or Fiddler over in-app inspectors

Strengths

  • Provides a dedicated visual inspector UI with search and filtering capabilities
  • Supports optional password protection for the inspector
  • Allows copying requests directly to cURL format

Weaknesses

  • Requires wrapping the app root with `DioRequestInspectorMain` and adding a navigator observer
  • Tied specifically to Dio

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
3

Add the dependency, register the Dio interceptor, wrap your root app with DioRequestInspectorMain, and add DioRequestInspector.navigatorObserver to your MaterialApp.

final DioRequestInspector inspector = DioRequestInspector(
  isInspectorEnabled: true,
  password: '123456',
  showSummary: true,
);
dio.interceptors.add(inspector.getDioRequestInterceptor());

Alternatives

Packages that do the same job and could replace dio_request_inspector.

  • pretty_dio_logger

    If you prefer console-based pretty logging for Dio instead of an in-app visual inspector UI.

  • talker

    If you need a comprehensive, extensible logging and exception handling package with a visual payload viewer.

Works with

Packages commonly used together with dio_request_inspector: ones it builds on, ones built on it, and its own family.