Debugging Network Calls in Flutter with Alice

By | June 21, 2022

In this article I am showing a useful plugin to debug network calls in Flutter.
Alice! You can find the alice package here.

Alice is an HTTP Inspector tool for Flutter which helps debugging http requests. It catches and stores http requests and responses, which can be viewed via simple UI.

It is simple to integrate!

First add the dependency in pubspec.yaml.

    sdk: flutter
  cupertino_icons: ^1.0.3
  alice: ^0.2.5
  http: ^0.13.4

Create instance of Alice.

Alice alice = Alice();

Attach alice to your network calls.

import 'package:http/http.dart' as http;

final response = await http

if (kDebugMode) alice.onHttpResponse(response);

Open Debug info UI

After the network call has been made, you can open up alice inspector using the below code.


Debug network calls flutter

Find me on
Twitter: @mr_vipin_nair

Leave a Reply

Your email address will not be published. Required fields are marked *