Flutter · colveor_ui
Storage
VoStorage wraps the secure storage colveor_ui already depends on, so apps and packages built on it don't need their own storage dependency.
Usage
Dart
import 'package:colveor_ui/storage.dart';
const storage = VoStorage();
await storage.write('onboarding_done', 'true');
final done = await storage.read('onboarding_done') == 'true';Values are stored with flutter_secure_storage (Keychain on iOS and macOS, encrypted storage on Android).
API
| Name | Description |
|---|---|
read(key) | Future<String?> — the value, or null if nothing is saved. |
write(key, value) | Save a string value. |
containsKey(key) | Future<bool>. |
delete(key) | Remove one value. |
readAll() | Future<Map<String, String>> of everything saved. |
deleteAll() | Remove every value. |
Reserved keys
The packages store these keys; avoid reusing them.
| Name | Description |
|---|---|
theme_mode | The saved theme mode (colveor_ui). |
vo_refresh_token, vo_user | The auth session (colveor). |
vo_dpop_ec_jwk | The DPoP device key (colveor). |
vo_notification_has_asked, vo_notification_last_token | Notification state (colveor). |
Warning
deleteAll() clears every key, including the ones above. Prefer delete(key) for your own values.