Local Storage Adapter
Component Detail
Infrastructure
low complexity
Shared Component
mobile
0
Dependencies
1
Dependents
2
Entities
0
Integrations
Description
Thin wrapper around the device key-value store (SharedPreferences on Flutter) providing a typed, async interface for persisting small preference values. Shared across features that need lightweight local persistence without a full SQLite database.
local-storage-adapter
Responsibilities
- Read and write string, integer, and boolean values by key
- Namespace keys per feature to avoid collisions
- Handle initialisation errors gracefully with safe defaults
- Provide a clear-all method scoped to a namespace for sign-out cleanup
Interfaces
getString(String key) -> Future<String?>
setString(String key, String value) -> Future<void>
getInt(String key) -> Future<int?>
setInt(String key, int value) -> Future<void>
getBool(String key) -> Future<bool?>
setBool(String key, bool value) -> Future<void>
remove(String key) -> Future<void>
clearNamespace(String namespace) -> Future<void>
Relationships
Related Data Entities (2)
Data entities managed by this component