flutter_network_debugger library

A comprehensive network debugging tool for Flutter applications.

This library provides real-time monitoring and visualization of HTTP and WebSocket network calls in your Flutter app. It includes:

Usage

Wrap your app with FlutterNetworkDebugger:

FlutterNetworkDebugger(
  child: MaterialApp(
    home: MyApp(),
  ),
  isDebug: true,
)

Then add the Dio interceptor to your Dio instance:

final dio = Dio();
dio.interceptors.add(FlutterNetworkDebuggerDioInterceptor());

And log WebSocket events:

FlutterNetworkSocketMonitor.logSocketEvent(
  url: 'ws://example.com',
  event: 'send',
  data: jsonEncode({'message': 'hello'}),
);

Classes

FlutterNetworkDebugger
A widget that wraps your app to display a network debugging interface.
FlutterNetworkDebuggerDioInterceptor
Dio interceptor for capturing HTTP network calls.
FlutterNetworkSocketMonitor
Monitor for WebSocket and other socket-based connections.
NetworkCall
Represents a single network call with complete request and response information.
NetworkMonitorCore
Core singleton for managing network call monitoring.
NetworkMonitorScreen
Screen that displays a list of all captured network calls.

Enums

NetworkCallType
Enumeration of supported network call types.