uDownloadStatusLabel function
Implementation
String uDownloadStatusLabel(UDownloadTask task) => switch (task.status) {
UDownloadStatus.queued => U.s.downloadQueued,
UDownloadStatus.scheduled => U.s.downloadScheduled,
UDownloadStatus.waitingForNetwork => task.request.wifiOnly ? U.s.waitingForWifi : U.s.waitingForNetwork,
UDownloadStatus.connecting => U.s.connecting,
UDownloadStatus.downloading => U.s.downloading,
UDownloadStatus.paused => U.s.paused,
UDownloadStatus.verifying => U.s.verifying,
UDownloadStatus.completed => U.s.completed,
UDownloadStatus.failed => uDownloadErrorLabel(task.error),
UDownloadStatus.canceled => U.s.cancelled,
};