fix: fix type issue with keys in practice selection repo

This commit is contained in:
ggurdin 2025-12-04 14:26:41 -05:00
parent e913495275
commit 54117f4f77
No known key found for this signature in database
GPG key ID: A01CB41737CBB478

View file

@ -77,17 +77,19 @@ class PracticeSelectionRepo {
static PracticeSelection? _getCached(
String eventId,
) {
for (final String key in _storage.getKeys()) {
try {
try {
final keys = List.from(_storage.getKeys());
for (final String key in keys) {
final cacheEntry = _PracticeSelectionCacheEntry.fromJson(
_storage.read(key),
);
if (cacheEntry.isExpired) {
_storage.remove(key);
}
} catch (e) {
_storage.remove(key);
}
} catch (e) {
_storage.erase();
return null;
}
final entry = _storage.read(eventId);