dio_request_inspector 3.0.1 dio_request_inspector: ^3.0.1 copied to clipboard
Debug and Sharing your HTTP Request/Response with UI Inspector.
Dio Requests Inspector Package
Effortlessly Debug Your Flutter Network Requests
"Dio Request Inspector" is a handy open-source tool for **monitoring and analyzing HTTP requests** in Flutter applications using the Dio package. It provides real-time insights, detailed request information, and filtering capabilities, making it easy to **track and troubleshoot server interactions**.
Get Started #
Installation
Add the dependency to your pubspec.yaml
:
You can use the command to add dio_request_inspector as a dependency with the latest stable version:
$ flutter pub add dio_request_inspector
Or you can manually add dio_request_inspector into the dependencies section in your pubspec.yaml:
dependencies:
dio_request_inspector: ^replace-with-latest-version
Basic Usage #
- Create DioRequestInspector instance
DioRequestInspector dioRequestInspector = DioRequestInspector(isDebugMode: true);
- Add DioRequestInterceptor to your Dio instance
_dio.interceptors.add(dioRequestInspector.getDioRequestInterceptor());
- Wrap your MaterialApp with DioRequestInspectorMain
DioRequestInspectorMain(inspector: dioRequestInspector, child: MyApp())
- Integrate with MaterialApp (version >= 3.0.0)
Wrap your
MaterialApp
withDioRequestInspectorMain
and utilize thenavigatorObservers
property to enable automatic navigation to the inspector UI:
DioRequestInspectorMain(
inspector: dioRequestInspector,
child: MaterialApp(
// Your MaterialApp configuration
navigatorObservers: [
DioRequestInspector.navigatorObserver,
],
),
)
See Inspector UI #
Run your app and long press on the screen to open the inspector UI.