An open API service indexing awesome lists of open source software.

https://github.com/thealteria/nirikshak

Nirikshak is a lightweight Dio HTTP Inspector tool for Flutter which helps debugging http requests. It's a fork of popular package alice.
https://github.com/thealteria/nirikshak

dart dart-library dio flutter flutter-examples flutter-package http inspector

Last synced: 7 months ago
JSON representation

Nirikshak is a lightweight Dio HTTP Inspector tool for Flutter which helps debugging http requests. It's a fork of popular package alice.

Awesome Lists containing this project

README

          



# Nirikshak

[![pub package](https://img.shields.io/pub/v/nirikshak.svg)](https://pub.dartlang.org/packages/nirikshak)
[![pub package](https://img.shields.io/github/license/thealteria/nirikshak.svg?style=flat)](https://github.com/thealteria/nirikshak)
[![pub package](https://img.shields.io/badge/platform-flutter-blue.svg)](https://github.com/thealteria/nirikshak)
[![pub package](https://img.shields.io/github/stars/thealteria/nirikshak?logo=github&logoColor=white)](https://github.com/thealteria/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](https://github.com/jhomlala/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

1. Add this to your **pubspec.yaml** file:

```yaml
dependencies:
nirikshak: ^latest-version
```

2. Install it

```bash
$ flutter packages get
```

3. Import it

```dart
import 'package:nirikshak/nirikshak.dart';
```

## Usage
### Nirikshak configuration
1. Create Nirikshak instance:

```dart
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.

```dart
Dio dio = Dio();
dio.interceptors.add(nirikshak.getDioInterceptor());
```

## Show inspector manually

To view the Nirikshak, you need to call `showNirikshak` with `context`:

```dart
nirikshak.showNirikshak(context);
```

## Example
See complete example here: https://github.com/thealteria/nirikshak/blob/main/example/lib/main.dart