搜索插件、代码仓与 APP 分类

alice 封面
插件详情v2.0.0

alice

Alice 是一个 HTTP 检查工具,可帮助调试 HTTP 请求。它会捕获并存储 HTTP 请求和响应,可通过简单 UI 查看。

AndroidiOS
近 30 天下载
4.5万
喜欢数
353
Pub 分数
160

安装插件

flutter pub add alice

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

Alice 是一个用于 Flutter 应用程序的调试工具,可检查 HTTP 请求和响应。它拦截网络流量,存储数据,并提供一个简单的用户界面来查看详细的请求和响应信息,包括标头、正文和时间戳。非常适合开发人员排查 API 集成问题或在开发过程中分析网络行为。该工具可通过 pub add 轻松集成,并支持 Android 和 iOS 平台。

适合场景

  • 调试 API 调用
  • 检查请求/响应负载
  • 监控网络性能
  • 测试后端集成
  • 实时 HTTP 日志记录

主要特点

  • 实时 HTTP 请求拦截
  • 简单直观的用户界面
  • 支持请求头和请求体检查
  • 跨平台(Android & iOS)
  • 轻松集成到Flutter应用

适合对象

  • Flutter 开发者
  • API 测试人员
  • 移动应用调试器
  • 前端工程师
  • 使用 HTTP 客户端的开发团队

使用建议

  • 不适用于生产环境
  • 可能会影响调试模式下的性能
  • 需要手动激活
  • 仅限 HTTP 流量
  • UI 不可自定义

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Alice - HTTP Inspector for Flutter

pub package platform

alice_dio alice_chopper alice_http alice_http_client alice_graphql_client alice_objectbox


Why Alice?

Alice is an advanced HTTP Inspector tool for Flutter that helps you debug network requests effortlessly. It catches and stores HTTP requests and responses, allowing you to view detailed network logs directly within your app via a simple and intuitive UI.

Whether you are hunting down a broken API payload, checking headers, or monitoring performance, Alice provides all the details you need without requiring a proxy or external desktop tools. It's inspired by Chuck and Chucker.

Screenshots

Calls List Request Details JSON Viewer Timeline
Calls List Request Details JSON Viewer Timeline
Stats Dashboard Advanced Search Request Replay Dark Mode
Stats Dashboard Advanced Search Request Replay Dark Mode

Key Features

🔍 Deep Inspection

  • Detailed logs for every HTTP call (Headers, Body, Query Parameters, Timestamps)
  • Interactive tree-based JSON viewer for request and response bodies
  • Gantt chart Timeline to visually inspect staggered HTTP calls
  • Powerful HTTP calls search (with advanced syntax filters) and filtering
  • Programmatic Call Tagging (e.g., alice.tag(tag: 'login-flow'))
  • Automatic N+1 duplicate request detection
  • Statistics dashboard (bandwidth, success rate, call counts, ratio bars)
  • Flutter & Android native log integration

🛠️ Broad Compatibility

  • Supports all major Dart HTTP clients: Dio, Retrofit, http, HttpClient (dart:io), Chopper, and GraphQL

📱 UX & Workflow

  • Request Replay - resend HTTP calls directly from the inspector
  • Shake the device to open the inspector instantly
  • System notifications on HTTP calls
  • Export and save HTTP calls to file (TXT or HAR) for easy sharing
  • Persistent storage support (via ObjectBox)

Quick Start

1. Add dependency

Add the main Alice package (and any specific client plugins you need) to your pubspec.yaml:

dependencies:
  alice: ^1.10.0
  # Add plugins as needed, e.g.:
  # alice_dio: ^1.3.1
2. Initialize Alice

Create an instance of Alice. You should generally keep it as a singleton or provide it via dependency injection.

import 'package:alice/alice.dart';

Alice alice = Alice(
  showNotification: true,
  showInspectorOnShake: true,
);
3. Register the Navigator Key

Pass Alice's navigator key to your MaterialApp or CupertinoApp so she can open the UI:

MaterialApp(
  navigatorKey: alice.getNavigatorKey(),
  home: Scaffold(...),
)
4. Attach to your HTTP Client

Alice works by attaching an interceptor to your HTTP client. For example, using Dio:

import 'package:dio/dio.dart';
import 'package:alice_dio/alice_dio_adapter.dart';

Dio dio = Dio();
dio.interceptors.add(AliceDioAdapter().getInterceptor(alice));

// Now make requests! Alice will automatically record them.
dio.get("https://jsonplaceholder.typicode.com/posts");

For instructions on how to attach Alice to Chopper, standard http, or GraphQL, see the full documentation.

Architecture: Why Multiple Packages?

You may notice that Alice uses a multi-package architecture (e.g., alice_dio, alice_http, alice_chopper). This is a deliberate design choice!

Many similar inspector packages force you to pull in a massive dependency tree (Dio, HTTP, Chopper, GraphQL, etc.) all at once, even if your app only uses one of them. This is a bad pattern that bloats your app size, slows down build times, and causes version conflicts.

With Alice, you only install the core alice package and the specific adapter you need (e.g., alice_dio). We strictly avoid enforcing unnecessary dependencies on your project.

Documentation

For complete setup instructions, advanced configuration, and plugin details, please check the Full Documentation.

Custom Integrations & Enterprise Support

Alice has been the go-to Flutter HTTP inspector since its first release, and the ecosystem keeps growing. If your team needs something beyond what's here — a custom adapter for an internal HTTP client, a bespoke export format, enterprise storage backend, or anything else — I'm available for consulting.

Let's talk on LinkedIn →

所属分类

依赖

依赖清单 13 项

源码仓库

使用此插件的项目