local_storage_manager 1.0.3 copy "local_storage_manager: ^1.0.3" to clipboard
local_storage_manager: ^1.0.3 copied to clipboard

A comprehensive Flutter local storage manager package for your app.

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.0.3 - 2025-07-05 #

πŸ› Bug Fixes #

  • Improved error handling in batch operations
  • Enhanced type safety in generic methods
  • Fixed edge cases in key validation

πŸ”§ Improvements #

  • Optimized performance for multiple value operations
  • Better null handling in complex type serialization
  • Enhanced documentation and code comments

1.0.2 - 2025-07-05 #

  • Bug Fixes

1.0.1 - 2025-06-22 #

  • Fix linter problems
  • Add additional public API documentations

1.0.0 - 2024-12-19 #

πŸŽ‰ Initial Release #

This is the first stable release of Local Storage Manager, a comprehensive Flutter package for type-safe local storage operations with clean architecture principles.

✨ Features Added #

Core Storage Operations

  • Type-Safe Storage API: Generic methods with compile-time type safety for all operations
  • SharedPreferences Backend: Complete implementation using SharedPreferences with flutter_shared_utilities
  • Comprehensive Value Types: Support for primitives (String, int, double, bool), collections (List<T>, Map<String, T>), and complex objects via JSON serialization
  • Null Safety: Full null safety support with nullable value handling

Advanced Operations

  • Batch Operations: Efficient multi-key operations including setMultipleValues, removeMultipleValues, and getMultipleValues
  • Storage Information: Rich query methods including getAllKeys, getAllValues, getStorageSize, isEmpty, hasValue, and getKeysMatching
  • Key Management: Robust key validation and pattern matching capabilities

Error Handling & Reliability

  • Functional Error Handling: Either-style StorageResult<T> pattern for elegant error management
  • Comprehensive Failure Types: 11 distinct failure types covering all error scenarios
  • Detailed Error Information: Rich error context including stack traces, original errors, and additional metadata
  • Safe Operations: All operations wrapped in try-catch with proper error recovery

Architecture & Design

  • Clean Architecture: Abstract LocalStorageManager interface following dependency inversion principle
  • Extensible Design: Easy to add new storage backends (Hive, SQLite, etc.)
  • Immutable Models: All data models are immutable with proper equality and hash code implementations
  • Builder Pattern: Fluent API design for chaining operations

Developer Experience

  • Comprehensive Documentation: Extensive inline documentation with examples
  • Type Safety: Full generic support with compile-time type checking
  • Functional Programming: Rich functional operations including map, flatMap, fold, onSuccess, onFailure
  • Convenience Methods: Helper methods like getValueWithDefault for common patterns

πŸ“¦ Dependencies #

  • flutter: SDK dependency (>=3.0.0)
  • flutter_shared_utilities: ^1.0.3 (for safe serialization)
  • shared_preferences: ^2.5.3 (for storage backend)

πŸ§ͺ Testing & Quality #

  • Comprehensive Test Suite: Unit tests, integration tests, and error scenario testing
  • Example Application: Full-featured example app demonstrating all package capabilities
  • Code Quality: Strict linting rules with custom Flutter lints
  • Performance: Optimized batch operations and memory usage

πŸ“– Documentation #

  • Complete API Documentation: All public APIs documented with examples
  • Usage Guide: Comprehensive README with quick start and advanced usage
  • Error Handling Guide: Detailed error handling patterns and best practices
  • Architecture Guide: Clean architecture implementation details

πŸ”§ Supported Operations #

Basic Operations

  • setValue<T>(String key, T value) - Type-safe value storage
  • getValue<T>(String key) - Type-safe value retrieval
  • getValueWithDefault<T>(String key, {required T defaultValue}) - Safe retrieval with defaults
  • removeValue(String key) - Single key removal
  • containsKey(String key) - Key existence checking
  • clearAll() - Complete storage cleanup

Batch Operations

  • setMultipleValues(Map<String, Object?> values) - Multi-key storage
  • removeMultipleValues(List<String> keys) - Multi-key removal
  • getMultipleValues<T>(List<String> keys) - Multi-key retrieval

Storage Information

  • getAllKeys() - Get all stored keys
  • getAllValues() - Get complete storage contents
  • getStorageSize() - Get number of stored items
  • isEmpty() - Check if storage is empty
  • hasValue(String key) - Check if key has non-null value
  • getKeysMatching(String pattern) - Pattern-based key filtering

πŸ›‘οΈ Error Types Covered #

  • keyNotFound - Requested key doesn't exist
  • conversionError - Type conversion failures
  • serializationError - JSON serialization/deserialization failures
  • accessDenied - Storage access permission issues
  • quotaExceeded - Storage quota limitations
  • networkError - Network-related storage errors
  • operationFailed - General operation failures
  • invalidKey - Key format validation errors
  • invalidValue - Value format validation errors
  • corruptedData - Data integrity issues
  • unknown - Unexpected errors with full context

🎯 Target Platforms #

  • Flutter: 3.0.0 and above
  • Dart: 3.8.1 and above
  • Platforms: iOS, Android, Web, Desktop (all Flutter-supported platforms)

πŸ“ Breaking Changes #

None - this is the initial release.

πŸ”„ Migration Guide #

This is the first release, so no migration is required.

🀝 Contributors #

  • Initial implementation and architecture design
  • Comprehensive testing and documentation
  • Example application development

Note: This changelog follows Keep a Changelog format. For more details about changes, see the GitHub repository.

0
likes
160
points
64
downloads

Publisher

unverified uploader

Weekly Downloads

A comprehensive Flutter local storage manager package for your app.

Repository (GitHub)
View/report issues

Topics

#local-storage #shared-preferences #hive #sqflite #cache

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_shared_utilities, shared_preferences

More

Packages that depend on local_storage_manager