storageReadWithExpiry<T> function
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,
);
}