nabil6391 / flutter_download_manager

Flutter Download Manager is a Cross-Platform file downloader with resumeable, parallel and batch Download support. Also be notified of download status and progress updates
MIT License
46 stars 29 forks source link

Exception: type _CompactIterable<DownloadTask>' is not a subtype of type 'List<DownloadTask> #4

Closed brun0xon closed 1 year ago

brun0xon commented 2 years ago

flutter_download_manager: ^0.5.3

I/flutter (19219): type '_CompactIterable<DownloadTask>' is not a subtype of type 'List<DownloadTask>' in type cast
I/flutter (19219): #0      DownloadManager.getAllDownloads (package:flutter_download_manager/src/downloader.dart:228:26)

Please, change

List<DownloadTask> getAllDownloads() {
    return _cache.values as List<DownloadTask>;
}

to

List<DownloadTask> getAllDownloads() {
    return _cache.values.toList();
}
nabil6391 commented 2 years ago

Thanks , I will fix this