hybrid_storage 1.2.0
hybrid_storage: ^1.2.0 copied to clipboard
Hybrid storage library for Flutter providing a unified API across multiple storage backends with logging support.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.2.0 #
Major Update: Full WASM Support & Enhanced Security #
This release brings full WebAssembly compatibility and updates all dependencies to their latest stable versions, improving security and performance across all platforms.
Added #
- Full WASM compatibility - Library now compiles successfully for Flutter Web with WebAssembly
- WebCrypto encryption on Web - Upgraded to
flutter_secure_storage10.0.0 with experimental WebCrypto API encryption - Enhanced platform support - All storage implementations now work seamlessly on WASM-compiled web apps
- Comprehensive web security documentation - Added detailed section explaining encryption behavior on web platforms
Changed #
- Updated
flutter_secure_storagefrom ^9.2.2 to ^10.0.0 (WASM compatible with WebCrypto API) - Updated
shared_preferencesfrom ^2.3.3 to ^2.5.0 - Updated
injectableconstraint from ^2.3.2 to >=2.3.2 <3.0.0 for better compatibility - Improved package description (reduced from 204 to 112 characters for pub.dev compliance)
- Updated README with accurate web encryption information
- Clarified that web storage uses WebCrypto API (not unencrypted as previously stated)
Security Improvements #
- Web platforms now use WebCrypto API for encryption (experimental)
- Browser generates private encryption keys automatically
- Data is encrypted in LocalStorage (previously was unencrypted)
- Keys are non-portable (tied to browser + domain for security)
- Added security warnings and best practices for web storage
- Documented HTTPS requirements and security headers needed for web deployment
Breaking Changes #
- None - Fully backward compatible
Migration Guide #
No code changes required. Simply update your pubspec.yaml:
dependencies:
hybrid_storage: ^1.2.0
Then run flutter pub get
Platform Support #
| Platform | Status | Encryption |
|---|---|---|
| Android | Production Ready | AES Native (KeyStore) |
| iOS | Production Ready | Native (Keychain) |
| macOS | Production Ready | Native (Keychain) |
| Linux | Production Ready | Native (libsecret) |
| Windows | Production Ready | Native (Credential Storage) |
| Web (JS) | Production Ready | WebCrypto API (Experimental) |
| Web (WASM) | Production Ready | WebCrypto API (Experimental) |
Testing #
- All 45 unit tests passing
- Successfully builds for WASM target
- Verified on Flutter 3.27.0 with Dart 3.10.3
Notes #
- Web encryption uses WebCrypto API and requires HTTPS in production
- Encrypted web data is not portable between browsers or domains (security feature)
- For maximum security on web, consider using HttpOnly cookies for critical tokens
- Minimum Flutter version: 3.24+ for WASM support
1.1.0 #
Added #
- Complete functional example project in
example/folder - Example screen demonstrating usage WITHOUT dependency injection (direct instantiation)
- Example screen demonstrating usage WITH dependency injection (get_it + injectable)
- Reference implementation of
StorageModulefor injectable users - Injectable dependency (optional) for dependency injection support
- Documentation on DI setup patterns and best practices
- Runnable Flutter example app showcasing all library features
Removed #
- Simple
example/example.dartfile (replaced by complete example app)
Changed #
- Improved example documentation with clear DI vs non-DI patterns
- Enhanced README with links to example implementations
1.0.0 #
Added #
- Initial release of Hybrid Storage library
StorageServiceinterface with basic storage operationsSecureStorageImplimplementation usingflutter_secure_storagePreferencesStorageImplimplementation usingshared_preferences- Integrated logging with
hybrid_logger - Support for String, bool, int, and double types
containsKeymethod to verify key existence- Automatic initialization logging
- Automatic error logging with detailed context
- Complete documentation in README.md
- Usage examples in example/example.dart
- DI-agnostic design (removed injectable dependency)
- Comprehensive unit tests with 45 test cases
Features #
- ✅ Encrypted secure storage (Android, iOS, macOS, Linux, Windows)
- ✅ Unencrypted preferences storage (all platforms)
- ✅ Unified interface for both types
- ✅ Colored logs with contextual information
- ✅ Robust error handling
- ✅ Complete documentation and examples
- ✅ Cross-platform support (Android, iOS, Web, Linux, macOS, Windows)
Security Notes #
- ⚠️ Web Platform:
SecureStorageImpluses unencrypted LocalStorage on Web - ⚠️ Do not use
SecureStorageImplfor sensitive data on Web platforms - ✅ All other platforms use native encrypted storage (Keychain, KeyStore, etc.)