network_inspector_pro 0.1.0
network_inspector_pro: ^0.1.0 copied to clipboard
Professional Flutter network debugging with a revolutionary single-class API. Beautiful UI, real-time monitoring, zero configuration. Only one public class - all implementation stays private.
Changelog #
All notable changes to the Flutter Network Inspector package will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.1.0 - 2025-08-30 #
๐ Initial Release #
โจ Revolutionary Single Public API Design
- ๐ Private Implementation - All internal classes completely hidden from users
- ๐ฏ One Public Class -
FlutterNetworkInspectoris the ONLY exposed API - ๐ 2-Step Setup - Just add interceptor and wrap your app
- ๐ Clean Documentation - Only meaningful APIs are documented
- ๐ก๏ธ Future-Proof - Internal changes never break user code
๐ Core Features
- ๐ก Automatic Request Capture - Works seamlessly with Dio HTTP client
- ๐จ Beautiful Material Design UI - Clean, intuitive interface with color-coded indicators
- โก Real-time Monitoring - See requests as they happen with precise timing
- ๐ฑ Floating Overlay - Draggable button positioned anywhere on screen
- ๐ง Zero Configuration - Works out of the box with minimal setup
๐จ User Interface
- 4-Tab Detail View: Overview, Request, Response, Timing
- Color-Coded Status: Green (success), Red (error), Orange (redirect), Gray (pending)
- JSON Formatting: Beautiful, readable JSON display with syntax highlighting
- Search & Filter: Find specific requests by URL, method, or status
- Expandable Cards: Tap to expand/collapse request details
- Responsive Design: Works perfectly on phones, tablets, and desktop
๐ Advanced Features
- Statistics Dashboard: Success rates, error counts, timing analysis
- Memory Management: Automatic cleanup with 500-request LRU cache
- Performance Metrics: Request duration, fastest/slowest tracking
- Export Capabilities: JSON statistics export for analysis
- Debug Mode Support: Automatically disabled in release builds
๐ฅ Public API
class FlutterNetworkInspector {
// Core setup
static Interceptor get dioInterceptor;
static Widget wrapApp(Widget child, {bool? enabled, NetworkInspectorPosition position});
// Statistics and management
static NetworkInspectorStatistics getStatistics();
static void clearAllRequests();
static void enable() / disable();
static bool get isEnabled;
static int get totalRequests;
}
๐ฏ Position Options
NetworkInspectorPosition.topLeft/topRightNetworkInspectorPosition.bottomLeft/bottomRightNetworkInspectorPosition.centerLeft/centerRight
๐ Statistics API
class NetworkInspectorStatistics {
int totalRequests, successfulRequests, failedRequests;
double successRate, averageResponseTime;
int fastestRequest, slowestRequest;
}
๐ ๏ธ Technical Excellence
- Flutter SDK 3.9.0+ support with null safety
- Dio 5.4.0+ integration for HTTP interception
- Material Design 3 components and theming
- Platform Agnostic - iOS, Android, Web, Desktop support
- Thread-Safe operations with proper state management
- Memory Efficient - Lightweight with automatic cleanup
๐ Documentation #
๐ Comprehensive Guides
- Complete API Documentation - Generated with dartdoc
- Quick Start Guide - 2-step setup process
- Usage Examples - Practical code snippets for every feature
- Advanced Configuration - Custom positioning, conditional enabling
- Statistics Usage - Performance monitoring and analysis
๐ฏ Developer Resources
- Example App - 8 different request scenarios for testing
- Contributing Guide - Development setup and guidelines
- README Documentation - Complete feature overview
- Makefile Commands - Easy development workflow
๐งช Testing & Quality #
โ Test Coverage
- Public API Tests - Complete coverage of exposed functionality
- Integration Tests - Real HTTP request/response scenarios
- Widget Tests - UI component testing
- Automated CI/CD - Continuous testing and validation
๐ Quality Standards
- Code Analysis - Passes all Flutter/Dart linting rules
- Documentation - Every public method documented with examples
- Performance - Zero impact on application network performance
- Accessibility - Screen reader support and keyboard navigation
๐จ Design Philosophy #
๐๏ธ Architecture
- Single Responsibility - Each internal class has one clear purpose
- Encapsulation - All implementation details completely hidden
- Composition - Clean separation between data, UI, and business logic
- Observer Pattern - Real-time UI updates using ChangeNotifier
๐ Privacy by Design
- Internal Classes Hidden - Users can't access implementation details
- Stable Public Interface - Breaking changes impossible for users
- Progressive Enhancement - Internal improvements don't affect user code
- Professional Package Design - Follows Flutter ecosystem best practices
๐ Getting Started #
// Step 1: Add interceptor
final dio = Dio();
dio.interceptors.add(FlutterNetworkInspector.dioInterceptor);
// Step 2: Wrap your app
FlutterNetworkInspector.wrapApp(
MaterialApp(home: MyHomePage()),
)
๐ Impact #
This release establishes Flutter Network Inspector as the cleanest, most professional network debugging package in the Flutter ecosystem, with a revolutionary single-class public API that hides all complexity while providing maximum functionality.
Upcoming Features #
0.2.0 Planned #
- HTTP Package Support - Interceptor for standard HTTP package
- Export Formats - HAR, Postman collection export
- Request Replay - Replay captured requests for testing
- Custom Themes - Dark/light mode and color customization
0.3.0 Planned #
- Mock Response - Mock server responses for testing
- Request Templates - Save and reuse common requests
- Analytics Integration - Export data to analytics platforms
- Performance Insights - Advanced performance analysis
Contributing #
We welcome contributions! Please see our Contributing Guide for details.
License #
This project is licensed under the MIT License - see the LICENSE file for details.
- Dio Interceptor for automatic request/response logging
- HTTP Client Interceptor for standard http package support
- Floating Overlay Button with request count and status indicators
- Comprehensive Request Details with 4-tab interface:
- Overview: General info, timing, status
- Request: Headers and body with JSON formatting
- Response: Headers and body with JSON formatting
- Headers: Complete request/response headers
- Search & Filter functionality for finding specific requests
- Color-Coded Status Indicators:
- ๐ข Green: Success (2xx)
- ๐ด Red: Error (4xx, 5xx, network errors)
- ๐ Orange: Pending/Redirects (3xx)
- โช Gray: Cancelled
- Performance Statistics:
- Total requests count
- Success/failure rates
- Average response time
- Copy to Clipboard functionality for URLs and request details
- Plug & Play Integration with minimal setup required
๐ฑ UI Components
InspectorScreen: Full-screen network requests viewerInspectorOverlay: Draggable floating button overlayNetworkInspectorApp: Wrapper widget for easy integrationNetworkRequestTile: Expandable request list item
๐ง Core Components
NetworkInspector: Singleton manager for request trackingNetworkRequest: Comprehensive request/response modelNetworkInspectorDioInterceptor: Dio integrationHttpClientInterceptor: HTTP client integration
๐ฏ Developer Experience
- Extension method:
Widget.withNetworkInspector() - Debug-mode only operation support
- Automatic JSON pretty-printing
- Request timing and performance metrics
- Memory-efficient request storage (max 500 requests)
๐ฆ Dependencies #
flutter: ">=1.17.0"http: ^1.2.0dio: ^5.4.0
๐ Getting Started #
// Setup Dio interceptor
final dio = Dio();
dio.interceptors.add(NetworkInspectorDioInterceptor());
// Wrap your app
MyApp().withNetworkInspector()