storageSaveWithExpiry function

Future<void> storageSaveWithExpiry(
  1. String key,
  2. dynamic object, {
  3. required Duration ttl,
  4. bool inBackpack = false,
})

Save data to the storage class with an expiration time.

Implementation

Future<void> storageSaveWithExpiry(
  String key,
  dynamic object, {
  required Duration ttl,
  bool inBackpack = false,
}) async {
  await NyStorage.saveWithExpiry(key, object, ttl: ttl, inBackpack: inBackpack);
}