Nirikshak
Nirikshak is a lighweight Dio HTTP Inspector tool for Flutter which helps debugging http requests. Removed all the extra dependencies except Dio. It's a fork of Alice.
Features:
✔️ Removed all the dependenices except Dio
✔️ Detailed logs for each Dio HTTP calls (HTTP Request, HTTP Response)
✔️ Inspector UI for viewing HTTP calls
✔️ Statistics
✔️ Error handling
✔️ HTTP calls search
Install
- Add this to your pubspec.yaml file:
dependencies:
nirikshak: ^latest-version
- Install it
$ flutter packages get
- Import it
import 'package:nirikshak/nirikshak.dart';
Usage
Nirikshak configuration
- Create Nirikshak instance:
Nirikshak nirikshak = Nirikshak();
And that's it! Nirikshak will automatically takes the theme mode as per your app.
Dio configuration
You just need to add the Dio interceptor.
Dio dio = Dio();
dio.interceptors.add(nirikshak.getDioInterceptor());
Show inspector manually
To view the Nirikshak, you need to call showNirikshak
with context
:
nirikshak.showNirikshak(context);
Example
See complete example here: https://github.com/thealteria/nirikshak/blob/main/example/lib/main.dart
Libraries
- core/nirikshak_core
- core/nirikshak_dio_interceptor
- helper/nirikshak_alert_helper
- model/model
- model/nirikshak_form_data_file
- model/nirikshak_from_data_field
- model/nirikshak_http_call
- model/nirikshak_http_error
- model/nirikshak_http_request
- model/nirikshak_http_response
- nirikshak
- ui/page/nirikshak_call_details_screen
- ui/page/nirikshak_calls_list_screen
- ui/page/nirikshak_stats_screen
- ui/widget/nirikshak_base_call_details_widget
- ui/widget/nirikshak_call_error_widget
- ui/widget/nirikshak_call_list_item_widget
- ui/widget/nirikshak_call_overview_widget
- ui/widget/nirikshak_call_request_widget
- ui/widget/nirikshak_call_response_widget
- utils/nirikshak_extension
- utils/nirikshak_strings