chore: integrate Hive for local storage management
- Added `hive_ce` and `hive_ce_flutter` dependencies for enhanced local storage capabilities. - Refactored the main application to initialize Hive and migrate existing data. - Updated storage service implementations to utilize Hive for managing application settings and task queues. - Removed the deprecated `StorageService` class to streamline the codebase and improve maintainability.
This commit is contained in:
29
lib/core/persistence/persistence_keys.dart
Normal file
29
lib/core/persistence/persistence_keys.dart
Normal file
@@ -0,0 +1,29 @@
|
||||
/// Keys previously stored in SharedPreferences. Centralized so Hive-based
|
||||
/// storage and migration logic stay aligned.
|
||||
final class PreferenceKeys {
|
||||
static const String reduceMotion = 'reduce_motion';
|
||||
static const String animationSpeed = 'animation_speed';
|
||||
static const String hapticFeedback = 'haptic_feedback';
|
||||
static const String highContrast = 'high_contrast';
|
||||
static const String largeText = 'large_text';
|
||||
static const String darkMode = 'dark_mode';
|
||||
static const String defaultModel = 'default_model';
|
||||
static const String omitProviderInModelName = 'omit_provider_in_model_name';
|
||||
static const String voiceLocaleId = 'voice_locale_id';
|
||||
static const String voiceHoldToTalk = 'voice_hold_to_talk';
|
||||
static const String voiceAutoSendFinal = 'voice_auto_send_final';
|
||||
static const String socketTransportMode = 'socket_transport_mode';
|
||||
static const String quickPills = 'quick_pills';
|
||||
static const String sendOnEnterKey = 'send_on_enter';
|
||||
static const String rememberCredentials = 'remember_credentials';
|
||||
static const String activeServerId = 'active_server_id';
|
||||
static const String themeMode = 'theme_mode';
|
||||
static const String localeCode = 'locale_code_v1';
|
||||
static const String onboardingSeen = 'onboarding_seen_v1';
|
||||
static const String reviewerMode = 'reviewer_mode_v1';
|
||||
}
|
||||
|
||||
final class LegacyPreferenceKeys {
|
||||
static const String attachmentUploadQueue = 'attachment_upload_queue';
|
||||
static const String taskQueue = 'outbound_task_queue_v1';
|
||||
}
|
||||
Reference in New Issue
Block a user