addNotification static method
void
addNotification(
- DownloadTask task
Implementation
static void addNotification(DownloadTask task) {
assert(_isInit, 'NotificationManager not initialized');
assert(_notificationMap[task.downloadId] == null, 'Notification already added');
listener(DownloadTask task) {
_updateNotification(task);
}
_notificationMap[task.downloadId] = listener;
task.addListener(listener);
}