sharedprefs to hive

This commit is contained in:
Ashita Prasad
2025-06-23 03:04:24 +05:30
parent 9089179a1a
commit 702b0d119c
2 changed files with 11 additions and 9 deletions

View File

@@ -147,11 +147,16 @@ class HiveHandler {
Future<dynamic> getHistoryRequest(String id) async =>
await historyLazyBox.get(id);
Future<void> setHistoryRequest(
String id, Map<String, dynamic>? historyRequestJsoon) =>
historyLazyBox.put(id, historyRequestJsoon);
String id, Map<String, dynamic>? historyRequestJson) =>
historyLazyBox.put(id, historyRequestJson);
Future<void> deleteHistoryRequest(String id) => historyLazyBox.delete(id);
Future<dynamic> getDashbotMessages() async =>
await dashBotBox.get(kKeyDashBotBoxIds);
Future<void> saveDashbotMessages(String messages) =>
dashBotBox.put(kKeyDashBotBoxIds, messages);
Future clearAllHistory() async {
await historyMetaBox.clear();
await historyLazyBox.clear();