restoreState static method
Deserializes the previously serialized string into an object and makes it available in the WrenchStore
Implementation
static Future<void> restoreState(
void Function(
void Function<T>(T t) update,
String modelName,
String jsonStr,
) callback,
List<String> serializerNames,
) async {
if (persistent && hiveBox != null) {
Box box = Hive.box(hiveBox!);
if (box.isOpen) {
for (dynamic key in box.keys) {
if (serializerNames.contains(key)) {
callback(WrenchStore.update, key, box.get(key));
}
}
}
}
}