persistObject static method
Writes serialized object to a file
Implementation
static Future<void> persistObject(String key, String value) async {
if (persistent && hiveBox != null) {
Box box = Hive.box(hiveBox!);
if (box.isOpen) {
await box.put(key, value);
}
}
}