resume method
Resumes a previously interrupted download
Throws:
- UnsupportedError if task cannot be resumed
NetworkException
for network errors
Implementation
@override
Future<void> resume(String taskId) async {
final task = _activeTasks[taskId];
if (task == null) {
throw UnsupportedError('Task not found: $taskId');
}
final canResumeTask = await canResume(taskId);
if (!canResumeTask) {
throw UnsupportedError('Task cannot be resumed: $taskId');
}
await _downloader.resume(task);
}