storageReadWithExpiry<T> function

Future<T?> storageReadWithExpiry<T>(
  1. String key, {
  2. T? defaultValue,
  3. Map<Type, dynamic>? modelDecoders,
  4. bool deleteIfExpired = true,
})

Read data from the storage class, respecting TTL expiration.

Implementation

Future<T?> storageReadWithExpiry<T>(
  String key, {
  T? defaultValue,
  Map<Type, dynamic>? modelDecoders,
  bool deleteIfExpired = true,
}) async {
  return await NyStorage.readWithExpiry<T>(
    key,
    defaultValue: defaultValue,
    modelDecoders: modelDecoders,
    deleteIfExpired: deleteIfExpired,
  );
}