storeJson static method
Saves a JSON object
to local storage.
Implementation
static Future storeJson(String key, object, {bool inBackpack = false}) async {
if (inBackpack == true) {
Backpack.instance.set(key, object);
}
try {
return await manager().write(key: key, value: jsonEncode(object));
} on Exception catch (e) {
NyLogger.error(e.toString());
NyLogger.error(
'[NyStorage.store] Failed to store $object to local storage. Please ensure that the object is a valid JSON object.');
}
}