keep 0.5.2
keep: ^0.5.2 copied to clipboard
Typed, reactive, encrypted local storage for Flutter.
0.5.2 #
- Refactored file write operations with a robust
atomicWriteutility. - Added explicit directory checks and temporary file validation to prevent
PathNotFoundExceptionduring atomic swaps. - Improved error handling by ensuring temporary files are cleaned up on failure.
- Specialized for better stability on emulators and slow file systems.
0.5.1 #
Added #
- Uint8List Support: New
kBytesandkBytesSecurefactories for efficient byte array storage. - Custom Serialization for Secure Keys: Secure factories now support optional
fromStorageandtoStoragemappers.
Changed #
- Performance: General optimizations for better memory efficiency and speed.
- Code Clarity: Improved internal factory logic for better readability.
0.5.0 #
Added #
- Multi-Instance Support: Multiple
Keepinstances can now run concurrently with independent registries and storage locations.Keepconstructor now requires a uniqueidfor stable identity and folder naming.- Automatic folder hashing ensures storage isolation based on instance ID.
- Refined Static Key Factories: Renamed factories for brevity and consistency:
Keep.kInt,Keep.kIntSecureKeep.kString,Keep.kStringSecureKeep.kBool,Keep.kBoolSecureKeep.kDouble,Keep.kDoubleSecureKeep.kList,Keep.kListSecureKeep.kMap,Keep.kMapSecureKeep.custom,Keep.customSecure
Changed #
- Breaking:
Keepconstructor requires positionalid: String. - Breaking:
Keep.init()no longer acceptsfolderNameas it is now derived fromid. Keepinstances now perform automatic key binding during construction for multi-instance support.
0.4.0 #
Added #
- Version-Based Migration System: Introduced
KeepCodecarchitecture for seamless storage format upgradesKeepCodec.of(bytes)automatically selects correct codec based on version byteKeepCodecV1implements current JSON-based format with optimized header structure- Future-proof: Add new codecs without breaking existing data
- New binary format with version-first layout:
[Version][Flags][Type][Lengths...][Data] KeepCodecOfwrapper for automatic codec selection and decodingKeepHeaderclass for metadata extraction without full payload parsing
Changed #
- Breaking: Binary format updated - version byte moved to first position for instant detection
- Batch encoding/decoding moved from codec interface to internal storage implementation
- Simplified codec interface to single-entry operations only
Performance #
- Header parsing now O(1) instead of O(n) due to fixed-position metadata
- Codec selection happens once at read time, not per-operation
0.3.0+1 #
0.3.0 #
Changed #
- Breaking:
SubKeyManager.toList()now works without requiring a meta-file. - Breaking: Storage format updated. Old data will be treated as non-existent and ignored.
Added #
SubKeyManager.toList()now finds sub-keys even if they haven't been written yet in the current session.clearRemovable()can now remove all removable sub-keys, even those not accessed in the current session.
Fixed #
- Improved reliability of sub-key discovery across app restarts.
0.2.16 #
0.2.15 #
0.2.13 #
Added #
- Added
SubKeyEventenum (added,removed,cleared) for tracking sub-key changes. - Added
streamgetter toSubKeyManagerfor reactive sub-key monitoring. SubKeyManagernow extendsChangeNotifierfor Flutter widget integration.- Added
dispose()method toSubKeyManagerfor proper resource cleanup.
0.2.10 #
Fixed #
- Fixed race condition in
SubKeyManager._ensureInitialized()that could cause concurrent calls to run multiple_performLoad()operations. - Added
_ensureInitialized()call toSubKeyManager.remove()to prevent data loss. - Errors in
_performLoad()now properly complete the completer with error, preventing infinite waits.
0.2.9 #
0.2.8 #
Fixed #
- Added try-catch blocks to
KeepCodec.encodeAll,decodeAll, andencodePayloadmethods.
0.2.7 #
Fixed #
- Internal storage now deletes corrupted files on decode failure instead of deadlocking.
0.2.6 #
Fixed #
- Added missing try-catch blocks to
SubKeyManagerI/O operations. - Disabled
avoid_catches_without_on_clauseslint rule for broader exception handling.
0.2.5 #
Added #
- Added memory cache for
KeepKeyPlainandKeepKeySecureread operations. - Added
clear()andremove()methods toSubKeyManager.
Changed #
- Renamed
KeepValueTypetoKeepType. - Replaced
tUnknownwithtNulland addedtBytesforUint8Listsupport.
Performance #
- Read operations now return cached values, significantly improving throughput.
- See
test/stress_test.dartfor benchmarks.
0.2.3 #
Added #
- Added
KeepValueTypeenum for type-safe binary encoding. - Type byte now stored in binary format header.
- Added
KeepValueType.parse<T>()for default type conversions.
0.2.2 #
0.2.1 #
0.2.0 #
Added #
- Introduced binary format versioning and migration infrastructure (V1).
- Improved storage key hashing and internal data obfuscation.
Changed #
- Breaking:
KeepKeySecurenow stores raw encrypted values directly for better efficiency. - Standardized code structure and return patterns.
Fixed #
- Fixed crash when handling empty external storage files.
- Added legacy format support during migration.
0.1.2 #
0.1.1 #
0.1.0 #
Added #
- Added
fromStorage/toStorageconverters toKeepKeyPlain. - Enhanced type safety for
Keep.listandKeep.mapfactories.
0.0.2 #
Added #
- Added static key factories (
Keep.integer,Keep.stringSecure, etc.). - Added
decimalanddecimalSecurefactories.
Changed #
Keep.keysnow uses internal registry for faster access.clearRemovable()automatically notifies listeners.
Fixed #
- Improved
numtodoubleconversion. - Fixed boolean parsing support.
0.0.1+1 #
- Internal build stabilization.
0.0.1 #
- Initial release