flutter_monitoring_sdk 0.0.1
flutter_monitoring_sdk: ^0.0.1 copied to clipboard
A lightweight Flutter monitoring SDK with logging, network monitoring, navigation tracking, and log viewer.
Flutter Monitoring SDK #
A lightweight, developer-friendly Flutter monitoring SDK for logging, network inspection, navigation tracking, crash monitoring, and debugging.
✨ Features #
| Feature | Supported |
|---|---|
| Application Logger | ✅ |
| Memory Storage | ✅ |
| Search Logs | ✅ |
| Filter Logs | ✅ |
| Statistics | ✅ |
| JSON Viewer | ✅ |
| Dio Monitoring | ✅ |
| HTTP Monitoring | ✅ |
| Navigation Tracking | ✅ |
| Crash Monitoring | ✅ |
| App Lifecycle Monitoring | ✅ |
| Session Monitoring | ✅ |
| Floating Action Button | ✅ |
| Built-in Monitoring Screen | ✅ |
| Example Application | ✅ |
| Unit Tested | ✅ |
Why Flutter Monitoring SDK? #
Flutter Monitoring SDK helps developers inspect application activity directly inside the application without relying on external monitoring services.
It is designed to be:
- Lightweight
- Easy to integrate
- Developer friendly
- Production ready
- Highly extensible
The SDK can monitor:
- Application logs
- Network requests
- Navigation events
- Application lifecycle
- Crash information
- User sessions
📦 Installation #
Add the package to your pubspec.yaml
dependencies:
flutter_monitoring_sdk: ^1.0.0
Install dependencies
flutter pub get
Import the package
import 'package:flutter_monitoring_sdk/flutter_monitoring_sdk.dart';
🚀 Quick Start #
Initialize the SDK before running your application.
void main() {
WidgetsFlutterBinding.ensureInitialized();
FlutterMonitoring.initialize();
runApp(const MyApp());
}
⚙️ Configuration #
Default configuration
FlutterMonitoring.initialize();
Custom configuration
FlutterMonitoring.initialize(
config: LoggerConfig(
enableConsoleLogs: true,
),
);
📝 Logger #
Record logs anywhere in your application.
Logger.v('Verbose log');
Logger.d('Debug log');
Logger.i('Application started');
Logger.w('Low memory warning');
Logger.e(
'Login failed',
error: exception,
);
Logger.f(
'Fatal error',
error: exception,
);
🌐 Dio Integration #
Automatically monitor every Dio request.
final dio = Dio();
dio.interceptors.add(
MonitoringInterceptor(),
);
Every request automatically captures:
- HTTP Method
- URL
- Request Body
- Response Body
- Headers
- Status Code
- Response Time
- Errors
🌍 HTTP Integration #
Use the provided monitoring client.
final client = MonitoringHttpClient();
final response = await client.get(
Uri.parse('https://jsonplaceholder.typicode.com/todos/1'),
);
All requests are automatically logged.
🧭 Navigation Tracking #
Track every screen transition.
MaterialApp(
navigatorObservers: [
FlutterMonitoring.navigatorObserver,
],
)
Automatically logs:
- Push
- Pop
- Replace
- Remove
💥 Crash Monitoring #
Record exceptions easily.
try {
throw Exception('Something went wrong');
} catch (e, stackTrace) {
Logger.e(
'Crash detected',
error: e,
stackTrace: stackTrace,
);
}
📱 App Lifecycle Monitoring #
Automatically tracks:
- Application Started
- Foreground
- Background
- Resumed
- Paused
- Detached
No additional setup is required after initialization.
⏱ Session Monitoring #
The SDK automatically records:
- Session Started
- Session Ended
- Session Duration
📊 Monitoring Screen #
Open the built-in monitoring dashboard.
FlutterMonitoring.show(context);
Or add the built-in Floating Action Button.
Scaffold(
floatingActionButton: FlutterMonitoring.fab(),
);
🔍 Search Logs #
Search across:
- Message
- Tag
- Log Level
- URL
- HTTP Method
- Status Code
- Exception
- Payload
🎯 Filter Logs #
Available filters:
- All
- Logs
- Network
- Verbose
- Debug
- Info
- Warning
- Error
- Critical
📈 Statistics #
Built-in statistics include:
- Total Logs
- Network Requests
- Errors
- Warnings
- Information Logs
- Debug Logs
📄 JSON Viewer #
Inspect complete payloads including:
- Request Body
- Response Body
- Headers
- Exception Details
- Metadata
📁 Project Structure #
lib/
├── flutter_monitoring_sdk.dart
└── src/
├── controllers/
├── core/
├── models/
├── monitoring/
├── navigation/
├── network/
├── storage/
├── ui/
└── utils/
🧪 Running the Example #
cd example
flutter pub get
flutter run
The example demonstrates:
- Logger
- Network Monitoring
- Navigation Monitoring
- Crash Monitoring
- Lifecycle Monitoring
- Session Monitoring
🧪 Running Tests #
Run all unit tests.
flutter test
Run static analysis.
dart analyze
Format the project.
dart format .
📸 Screenshots #
Add screenshots inside:
assets/screenshots/
Recommended screenshots:
- Home Screen
- Monitoring Dashboard
- Network Logs
- Log Details
- Statistics
- JSON Viewer
Example:



🛣️ Roadmap #
Version 1.1 #
- Retrofit Integration
- Chopper Integration
- GraphQL Integration
- WebSocket Monitoring
Version 1.2 #
- CSV Export
- Share Logs
- Persistent Storage
Version 2.0 #
- FPS Monitor
- Memory Usage Monitor
- CPU Monitor
- Performance Dashboard
- Timeline View
🤝 Contributing #
Contributions are welcome.
Please read:
- CONTRIBUTING.md
- CODE_OF_CONDUCT.md
- SECURITY.md
Before submitting a Pull Request, please ensure:
- Code is formatted
- Analyzer reports no issues
- All tests pass
- Documentation is updated
📄 License #
This project is licensed under the MIT License.
See the LICENSE file for details.
❤️ Support #
If you find this package useful:
- ⭐ Star the repository
- 🐛 Report bugs
- 💡 Suggest new features
- 🤝 Contribute improvements
Your support helps make Flutter Monitoring SDK better for the Flutter community.