storageSave function

Future storageSave(
  1. String key,
  2. dynamic object, {
  3. bool inBackpack = false,
})

Save data to the storage class.

Implementation

Future storageSave(String key, object, {bool inBackpack = false}) async {
  if (_Json.tryEncode(object) != null) {
    return await NyStorage.saveJson(key, object, inBackpack: inBackpack);
  }
  return await NyStorage.save(key, object, inBackpack: inBackpack);
}