DownloadService class abstract interface

Abstraction for downloading files from network Different implementations for different strategies

Platform implementations:

  • BackgroundDownloaderService: uses background_downloader package
  • SimpleDownloadService: uses http package
  • MockDownloadService: for testing
Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

download(String url, String targetPath, {String? token, CancelToken? cancelToken}) Future<void>
Downloads a file from URL to target path
downloadWithProgress(String url, String targetPath, {String? token, int maxRetries = 10, CancelToken? cancelToken}) Stream<int>
Downloads a file with progress tracking
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited