flutter_alice_dio 1.0.2 copy "flutter_alice_dio: ^1.0.2" to clipboard
flutter_alice_dio: ^1.0.2 copied to clipboard

A lightweight version of Alice for Dio, designed for simple logging in Flutter.

A lightweight version of Alice for Dio, designed for simple logging in Flutter. #

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.

Overlay bubble version of Alice: https://github.com/jhomlala/alice

Supported Dart http client plugins:

  • Dio

Features:
✔️ Detailed logs for each HTTP calls (HTTP Request, HTTP Response)
✔️ Inspector UI for viewing HTTP calls
✔️ Statistics
✔️ Support for top used HTTP clients in Dart
✔️ Error handling
✔️ HTTP calls search ✔️ Bubble overlay entry

Usage #

Alice configuration #

  1. Create Alice instance:
// Define a navigator key
final navigatorKey = GlobalKey<NavigatorState>();

// Create Alice with the navigator key
final alice = Alice(
      navigatorKey: navigatorKey,
      darkTheme: true);
  1. Add navigator key to your application:
dio.interceptors.add(alice.getDioInterceptor());

You need to add this navigator key in order to show inspector UI.

HTTP Client configuration #

For Dio

Add interceptor to your Dio instance:

final dio = Dio();
dio.interceptors.add(alice.getDioInterceptor());

Show inspector by shake gesture #

ShakeDetectWrap(
enabled: true,
onShake: () {
alice.showInspector();
}
child: Container(
  child: Text('Your app content here'),
));

Demo Log: #

Commemoration #

This package was originally authored by Anh Tuan.

1
likes
140
points
13
downloads

Publisher

unverified uploader

Weekly Downloads

A lightweight version of Alice for Dio, designed for simple logging in Flutter.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

dio, flutter, overlay_support, rxdart, share_plus

More

Packages that depend on flutter_alice_dio