INNER CODE UNIT · Dart

DownloadCanceledException

sheikhhaziq/gyawun_music · lib/services/download_manager.dart:20

class DownloadCanceledException implements Exception {}

class DownloadManager {
  final Box _box;
  Client client = Client();
  ValueNotifier<List<Map>> downloadsNotifier = ValueNotifier([]);
  ValueNotifier<Map<String, Map>> playlistsNotifier = ValueNotifier({});
  final Map<String, ValueNotifier<double>> _activeDownloadProgress = {};
  static const String songsPlaylistId = 'SNGS';
  final int maxConcurrentDownloads = 3; // Limit concurrent downloads
  final Queue<String> _activeDownloads =
      Queue<String>(); // Currently active downloads
  final Queue<Map> _downloadQueue = Queue<Map>(); // Queue for pending downloads

  Map get downloads => _box.toMap();

  Listenable songListenable(String songId) {
    return _box.listenable(keys: [songId]);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…