crashlog 1.0.0
crashlog: ^1.0.0 copied to clipboard
A comprehensive Flutter package for capturing errors, console logs, and screenshots with cross-platform support and dev report functionality.
Changelog #
All notable changes to the Crashlog package will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 - 2025-09-20 #
This is the initial stable release of the Crashlog package with full cross-platform support and comprehensive feature set.
Added #
- Initial release of Crashlog package
- Error Capture: Automatic capture of uncaught Flutter and Dart errors
- Console Logging: Capture and store all console output including
print(),debugPrint() - Screenshot Capture: Optional screenshot capture when errors occur (cross-platform)
- Dev Report Screen: Comprehensive UI for viewing, managing, and sharing logs
- Cross-Platform Support: Works on Android, iOS, Windows, macOS, Linux, and Web
- Automatic Cleanup: Configurable retention policies for logs and screenshots
- Non-Blocking Operations: All operations are asynchronous and won't block the app
- Storage Service: Local file storage with JSON format for logs
- Multiple Button Types: Various UI components for accessing dev reports
ErrorRecorderButton: Floating action buttonErrorRecorderIconButton: App bar icon buttonErrorRecorderInlineButton: Inline buttonErrorRecorderOverlayButton: Draggable overlay button
- ErrorRecorderWrapper: Widget wrapper for screenshot capture functionality
- Device Information: Automatic collection of device and app information
- Sharing Capabilities: Share logs individually or combined via platform sharing
- Customizable Configuration: Extensive configuration options
- Example App: Comprehensive example demonstrating all features
Features #
- Error log capture with stack traces, timestamps, and device info
- Console log capture with different log levels (info, warning, error, debug, custom)
- Screenshot capture on error (when enabled)
- Local storage with configurable file names and directories
- Automatic cleanup based on maximum log count and retention days
- Dev Report screen with tabbed interface for error logs and console logs
- Expandable error details with stack trace viewing
- Screenshot viewing in full-screen dialog
- Log sharing functionality (text format)
- Clear logs functionality with confirmation dialogs
- Cross-platform compatibility with graceful degradation
- Non-blocking asynchronous operations
- Memory and storage efficient with automatic cleanup
Configuration Options #
enabled: Enable/disable package functionalityenableScreenshots: Capture screenshots on errorsautoOpenOnError: Automatically open dev report when errors occurmaxLogs: Maximum number of error logs to retain (default: 50)maxConsoleLogs: Maximum number of console logs to retain (default: 1000)logRetentionDays: Delete logs older than specified daysshowDeviceInfo: Include device information in error logslogFileName: Custom error log file nameconsoleLogFileName: Custom console log file namescreenshotFolder: Custom screenshot folder name
Platform Support #
- ✅ Android: Full feature support
- ✅ iOS: Full feature support
- ✅ Windows: Full feature support
- ✅ macOS: Full feature support
- ✅ Linux: Full feature support
- ✅ Web: Partial support (no screenshots due to browser limitations)
Technical Details #
- Built with Flutter SDK >=3.0.0
- Dart SDK >=3.0.0 <4.0.0
- Dependencies:
path_provider: Local file storagedevice_info_plus: Device information collectionpackage_info_plus: App information collectionscreenshot: Screenshot capture functionalityshare_plus: Platform sharing capabilitiesjson_annotation: JSON serialization
Documentation #
- Comprehensive README with usage examples
- Inline code documentation
- Example app with various use cases
- Platform-specific implementation notes
Known Limitations #
- Web platform doesn't support screenshot capture due to browser security limitations
- Global
print()function override has limitations in Dart - Screenshot capture requires widget wrapping for optimal functionality
Future Roadmap #
- Remote log uploading capabilities
- Advanced filtering and search in dev report
- Log export in multiple formats (JSON, CSV, etc.)
- Integration with popular logging frameworks
- Performance metrics collection
- Crash analytics and reporting
- Custom log formatting options
- Plugin architecture for extensibility