netify 2.0.0
netify: ^2.0.0 copied to clipboard
A lightweight, debug-only network inspector for Flutter apps using Dio HTTP client. Features a modern UI, request grouping, favorites, dark mode, and share as image.
π Netify #
A lightweight, debug-only network inspector for Flutter apps using Dio HTTP client. Features a modern UI with draggable floating bubble, dark mode, and share as image. Built with clean architecture principles and zero impact on release builds.
β¨ Features #
- π‘ Network Inspection - Capture and inspect all HTTP requests/responses via Dio interceptor
- π«§ Floating Bubble - Draggable floating bubble with request count badge
- π Dark Mode - Toggle between light and dark themes
- π Request Grouping - Group requests by domain for better organization
- β Favorites - Bookmark important requests for quick access
- πΈ Share as Image - Export request details as shareable images
- π Search & Filter - Filter by status, method, and search by URL
- π€ Export Options - Copy as JSON/HAR or save to file
- π cURL Generation - Generate cURL commands for any request
- π Replay Requests - Re-send any captured request
- π² Tree-Shakable - Zero footprint in release builds
- π Detailed Metrics - Request time, response size, duration with color-coded indicators
- πͺΆ Lightweight - Native Android/iOS implementation, only 2 dependencies (Dio + screenshot)
πΈ Screenshots #
| Logs List | Log Detail | Dark Mode | Share as Image |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
π¦ Installation #
Add to your pubspec.yaml:
dependencies:
netify: ^2.0.0
dio: ^5.4.0 # Required peer dependency
Then run:
flutter pub get
π Quick Start #
import 'package:dio/dio.dart';
import 'package:netify/netify.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
final dio = Dio();
await Netify.init(dio: dio);
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
navigatorKey: Netify.navigatorKey, // β Add this line
home: HomePage(),
);
}
}
That's it! π The floating bubble will appear automatically.
π API Reference #
Initialize #
// Basic initialization
await Netify.init(dio: dio);
// With custom configuration
await Netify.init(
dio: dio,
enable: kDebugMode, // Only enable in debug mode
config: const NetifyConfig(
maxLogs: 1000,
entryMode: NetifyEntryMode.bubble,
),
);
Access Logs #
// Get logs stream
Stream<List<NetworkLog>> stream = Netify.logsStream;
// Get current logs
List<NetworkLog> logs = Netify.logs;
// Get log count
int count = Netify.logCount;
Search & Filter #
// Search logs by URL, method, or status
List<NetworkLog> results = Netify.searchLogs('api/users');
Export Logs #
// Export as JSON
String json = Netify.exportAsJson();
// Export as HAR format (for Chrome DevTools, Postman, etc.)
String har = Netify.exportAsHar();
Generate cURL #
// Generate cURL command for a request
String curl = Netify.generateCurl(log);
Clear Logs #
// Clear all logs
Netify.clearLogs();
Dispose #
// Dispose resources
await Netify.dispose();
π± UI Components #
NetifyPanel #
The main UI for viewing all captured network requests:
Navigator.push(
context,
MaterialPageRoute(builder: (_) => const NetifyPanel()),
);
LogDetailPage #
Detailed view of a single request (automatically opened from NetifyPanel):
Navigator.push(
context,
MaterialPageRoute(builder: (_) => LogDetailPage(log: networkLog)),
);
βοΈ Configuration Options #
| Option | Type | Default | Description |
|---|---|---|---|
maxLogs |
int |
500 |
Maximum number of logs to keep in memory |
showOnlyInDebug |
bool |
true |
Only initialize in debug mode |
entryMode |
NetifyEntryMode |
NetifyEntryMode.bubble |
Entry point mode (bubble or none) |
ποΈ Architecture #
Netify follows Clean Architecture principles:
lib/
βββ netify.dart # Public API
βββ src/
βββ core/ # Domain layer (pure Dart)
β βββ entities/ # Domain models
β βββ repositories/ # Abstract contracts
βββ data/ # Data layer
β βββ interceptor/ # Dio interceptor
β βββ repositories/ # Concrete implementations
β βββ services/ # External services
βββ presentation/ # Presentation layer
βββ pages/ # UI screens
βββ widgets/ # Reusable widgets
βββ theme/ # Design tokens
π Privacy & Security #
- All data is stored in-memory only - nothing persists to disk
- Automatically disabled in release builds (when
showOnlyInDebug: true) - No data is sent to external servers
- Logs are cleared when the app is closed
π€ Contributing #
Contributions are welcome! Please feel free to submit a Pull Request.
π License #
This project is licensed under the MIT License - see the LICENSE file for details.




