brix_storage library

Safe local storage for brix apps: values, secrets and a ready session store.

Classes

BrixCached<T>
Data from BrixOfflineCache and where it came from.
BrixOfflineCache<T>
A list that also works offline: every answer from your backend is saved on the device, and when the backend cannot be reached the saved copy is used instead. Back online, the backend wins again and the copy is refreshed.
BrixSessionStore<TUser>
A ready AuthSessionStore on BrixStorage: tokens and the remembered password as secrets, the user as JSON, the rest as plain values.
BrixStorage
One place for an app's local data: plain values and secrets.
MemoryStore
In-memory stores for tests (and a plain ValueStore / SecretStore example).
SecretStore
Where secrets live (tokens, passwords). Default: SecureSecretStore.
SecureSecretStore
SecretStore on flutter_secure_storage (Keychain / Keystore). On iOS secrets are readable after the first unlock and never leave the device.
SessionKeys
Where BrixSessionStore keeps each item. Pass the keys an older app version used, so its users stay logged in after the switch.
SharedPrefsStore
ValueStore on shared_preferences. Values saved as another type (an older app version's bool / int) are read as text.
ValueStore
Where plain values live (settings, ids, cached JSON). Default: SharedPrefsStore. Write your own to use Hive, a file, ...