getDownloadProgress method

  1. @override
Stream<double> getDownloadProgress(
  1. String taskId
)
override

Gets a stream of progress updates for a download task.

Parameters:

Returns a stream that emits double values between 0.0 and 1.0, representing the download progress percentage.

The stream completes when the download finishes or throws an error if the download fails.

Implementation

@override
Stream<double> getDownloadProgress(String taskId) {
  final controller = _progressControllers[taskId];
  if (controller == null) {
    throw Exception('Task not found: $taskId');
  }
  return controller.stream;
}