feat: Add generated Hive TypeAdapters for AppUser and PlaylistConfig models, and new build/doctor log files.

This commit is contained in:
Michael committed 2026-03-27 11:08:04 +01:00
1 parent 780f6c1842
commit ef97c6dc90
81 files changed
+3233 -2428

No files matched your search

+3
View File
@@ -52,6 +52,9 @@ class ApiClient {
return _token;
}
/// Get underlying Dio instance for direct use
Dio get dio => _dio;
/// Restore token from SharedPreferences
Future<void> restoreToken() async {
final prefs = await SharedPreferences.getInstance();
+17 -17
View File
@@ -139,14 +139,6 @@ class UnifiedDnsService {
return null;
}
/// Clear DNS cache
void clearCache() {
_cache.clear();
if (kDebugMode) {
debugPrint('🗑️ DNS cache cleared');
}
}
/// Get cache stats for debugging
Map<String, dynamic> getCacheStats() {
final expiredCount = _cache.values.where((e) => e.isExpired).length;
@@ -158,14 +150,22 @@ class UnifiedDnsService {
};
}
/// Cache entry with TTL
static class _DnsCacheEntry {
final String ip;
final DateTime timestamp;
_DnsCacheEntry(this.ip) : timestamp = DateTime.now();
bool get isExpired =>
DateTime.now().difference(timestamp).inSeconds > _cacheTtlSeconds;
/// Clear DNS cache
void clearCache() {
_cache.clear();
if (kDebugMode) {
debugPrint('🗑️ DNS cache cleared');
}
}
}
/// Cache entry with TTL
class _DnsCacheEntry {
final String ip;
final DateTime timestamp;
_DnsCacheEntry(this.ip) : timestamp = DateTime.now();
bool get isExpired =>
DateTime.now().difference(timestamp).inSeconds > 3600;
}