armor 1.0.0
armor: ^1.0.0 copied to clipboard
Bulletproof protection for Flutter apps. Automatically handles crashes, errors, and failures with graceful recovery.
Changelog #
All notable changes to the Armor 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 - 2024-07-12 #
Added #
- π Initial release of Armor package
- π‘οΈ
ArmorMixin
for bulletproof widget protection - π« Global error interception with
ArmorInterceptor
- π Error tracking and statistics with
ArmorRegistry
- π§ Core protection methods:
safeExecute()
- Execute code safely with fallbackssafeSetState()
- Prevent setState after dispose errorssafeAsync()
- Safe async operations with mounted checkssafeBuild()
- Build widgets with automatic fallback UI
- πΌοΈ
armorImage()
- Safe image loading with error handling - π
armorNetworkRequest()
- Network calls with retry logic - β±οΈ
armorTimer()
- Managed timers with automatic cleanup - π‘
armorStreamListen()
- Protected stream subscriptions - π§
armorPlatformCall()
- Safe platform method channel calls - π
armorFileOperation()
- Protected file system operations - β‘
armorPerformanceOperation()
- Performance monitoring wrapper - π Built-in statistics and monitoring
- π§Ή Automatic resource cleanup on widget dispose
- π§ͺ Comprehensive test coverage
- π Complete documentation and examples
- π― Zero-configuration setup
Features #
- Handles all major Flutter error types:
- Null safety errors
- setState after dispose
- Render overflow (yellow/black stripes)
- Image loading failures
- Network timeouts and errors
- Platform channel errors
- File system errors
- Memory leaks from undisposed resources
- Intelligent caching system for continuity during failures
- Performance monitoring with automatic warnings
- Real-time error statistics and healing metrics
- Stream-based error monitoring for analytics integration
- Minimal performance overhead
- Production-ready patterns and best practices
Documentation #
- Comprehensive README with quick start guide
- Complete API documentation
- Real-world usage examples
- Migration guide from manual error handling
- Best practices and FAQ
- Interactive example app demonstrating all features
Testing #
- Unit tests for all core functionality
- Widget tests for mixin behavior
- Integration tests for error scenarios
- Performance benchmarks
- 100% analyzer compliance
For more information, see the README and API documentation.