Are you tired of inspecting network requests of your Flutter app in logs or third-party tools? Chucker Flutter is for you!
An introduction of newly introduced Flutter package, Chucker Flutter
These days almost every developer faces rest APIs by one means or another. They surely make life easier for front-end developers, but, at the same time, their integration can be a serious headache if proper documentation of dependencies, for example, request and response models, end-points, query parameters, is not provided.
Chucker Flutter stores the HTTP(S) requests and responses, triggered by your Flutter App, locally using shared preferences and helps you inspect them in your app. It does not only save your time of diving into any third-party tool such as postman but also brings many other useful features such as sharing (We will talk about them later, be patient🙂).
How to use?📖
You can integrate Chucker Flutter in your app with 3 simple steps😃:
Add dependency in your
Just run the following command in your project folder.
or add the dependency manually like this:
ChuckerDioInterceptor in your
dio object like this:
This will allow Chucker Flutter to read request and response attributes so that it can process them for further manipulation.
Add Chucker Flutter’s
NavigatorObserver to your material app just like:
That is all🙂! Rest will be taken care of by Chucker Flutter itself💪.
- Built-in Dio interceptor (I will add wrappers to other commonly used libraries such as http in future Insha’Allah)
- It will work on Windows💻, Linux🖥️, Mac🧑💻, Android📱and iOS📲(⚠️For android you need to make minSdkVersion 22 in build.gradle file)
- The package supports a lot of customizations. Settings page⚙️ contain all supported settings.
- The library currently supports English and Urdu languages. Support for more languages to come Insha’Allah🤞.
- Searching🔍 and sharing👯
- Json responses in tree form 🌴 (Thanks to Flutter Json Viewer)
- You can also add chucker button to anywhere in your app to open Chucker Flutter’s main page.
Feel free to open issues/pull requests to help me improve this project.
- When reporting a new Issue, make sure to attach Screenshots, Videos or GIFs of the problem you are reporting.
- When submitting a new PR, make sure tests are all green. Write new tests if necessary.
I hope you find it useful! If yes then give me clap👏and share this article as much as you can❣️.
Thank You🙂! That’s all for now!
You can email me at email@example.com or reach me directly on LinkedIn.