app_debugger_network Pro
Alice-based HTTP inspector sub-brick for
app_debugger. Adds a Network tab to the debugger panel. Supports Dio and http network libraries. Automatically swapped to a no-op stub in release builds viabuild_prepare.yaml.
Version: 1.0.0
Variables
| Variable | Type | Default | Description |
|---|---|---|---|
| networkLibrary | enum | dio | Which HTTP client library to inspect. Must match your network SDK choice. Values: dio, http |
Prerequisites
app_debuggerbrick must be installed first.- Network SDK must be one of
network_sdk_dioornetwork_sdk_http.
Usage
Interactive
bash
archipelago generate app_debugger_networkNon-interactive (CI)
bash
archipelago generate app_debugger_network --config my_config.jsonWhen archipelago.yaml is present, networkLibrary is auto-detected from infrastructure.network_library.
Generated Structure
features/
└── app_debugger_network/
├── app_debugger_network_api/
│ └── lib/src/
│ └── models/
├── app_debugger_network/
│ └── lib/src/
│ └── di/
└── app_debugger_network_noop/
└── lib/src/
└── di/Required Setup
1. Attach Alice's navigator key to MaterialApp
Without a navigator key the "Open Full Inspector" button silently no-ops.
dart
final alice = getIt<Alice>();
// For apps using go_router / auto_route:
MaterialApp.router(
routerConfig: router,
builder: alice.buildWithNavigatorObserver,
)
// For apps using a plain Navigator:
MaterialApp(
navigatorKey: alice.getNavigatorKey(),
)2. Attach the adapter to your network client
Dio
dart
import 'package:alice_dio/alice_dio_adapter.dart';
// In your Dio factory / register_module.dart:
dio.interceptors.add(getIt<AliceDioAdapter>());http
dart
import 'package:alice_http/alice_http_adapter.dart';
final response = await http.get(uri);
getIt<AliceHttpAdapter>().onResponse(response);How It Works
NetworkInspectorSDKImplregisters aNetworkInspectorPagewithDebuggerPanelPageRegistryon construction.DebuggerPanelreadsDebuggerPanelPageRegistry.instance.pagesand appends extra tabs — no import ofapp_debugger_networkrequired.build_prepare.yamlswapsapp_debugger_network→app_debugger_network_noopfor release builds, stripping all Alice code from the binary.- The post-gen hook adds an eager
GetIt.I<NetworkInspectorSDK>()call inside thearchipelago:debug_panel_pagessentinel inbootstrap.dart.