mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-12-08 16:27:31 +00:00
27 lines
494 B
Dart
27 lines
494 B
Dart
enum DownloadStatus {
|
|
queued,
|
|
downloading,
|
|
completed,
|
|
failed,
|
|
paused,
|
|
canceled;
|
|
|
|
bool get isCompleted {
|
|
switch (this) {
|
|
case DownloadStatus.queued:
|
|
return false;
|
|
case DownloadStatus.downloading:
|
|
return false;
|
|
case DownloadStatus.paused:
|
|
return false;
|
|
case DownloadStatus.completed:
|
|
return true;
|
|
case DownloadStatus.failed:
|
|
return true;
|
|
|
|
case DownloadStatus.canceled:
|
|
return true;
|
|
}
|
|
}
|
|
}
|