mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-10-11 10:18:44 +02:00
chore: cleanup unused code and dead imports
This commit is contained in:
62 files changed
+213
-1326
No files matched your search
@@ -18,8 +18,6 @@ class CoverCacheManager {
|
||||
static bool _initialized = false;
|
||||
static String? _cachePath;
|
||||
|
||||
/// Get the singleton cache manager instance.
|
||||
/// Must call [initialize] before using this.
|
||||
static CacheManager get instance {
|
||||
if (!_initialized || _instance == null) {
|
||||
// Fallback to default cache manager if not initialized
|
||||
@@ -32,8 +30,6 @@ class CoverCacheManager {
|
||||
/// Check if cache manager is initialized
|
||||
static bool get isInitialized => _initialized && _instance != null;
|
||||
|
||||
/// Initialize the cache manager with persistent storage path.
|
||||
/// Call this once during app startup (in main.dart).
|
||||
static Future<void> initialize() async {
|
||||
if (_initialized) return;
|
||||
|
||||
@@ -73,7 +69,6 @@ class CoverCacheManager {
|
||||
await _instance!.emptyCache();
|
||||
}
|
||||
|
||||
/// Get cache statistics
|
||||
static Future<CacheStats> getStats() async {
|
||||
if (!_initialized || _cachePath == null) {
|
||||
return const CacheStats(fileCount: 0, totalSizeBytes: 0);
|
||||
@@ -113,7 +108,6 @@ class CacheStats {
|
||||
required this.totalSizeBytes,
|
||||
});
|
||||
|
||||
/// Get human-readable size string
|
||||
String get formattedSize {
|
||||
if (totalSizeBytes < 1024) {
|
||||
return '$totalSizeBytes B';
|
||||
|
||||
Reference in new issue
Block a user