DownloadHelper class

Download Manager for file downloads with progress tracking

Constructors

DownloadHelper({required Dio dio, required ApiConfig config, required ApiLogger logger})

Properties

activeDownloadsCount → int
Get active downloads count
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancelAllDownloads() → void
Cancel all active downloads
cancelDownload(String url) → void
Cancel download
downloadFile({required String url, String? savePath, String? filename, Map<String, dynamic>? headers, dynamic onProgress(int received, int total)?, CancelToken? cancelToken}) → Future<DownloadResult>
Download file from URL
downloadImage({required String url, String? savePath, String? filename, Map<String, dynamic>? headers, dynamic onProgress(int received, int total)?}) → Future<DownloadResult>
Download image
downloadMultiple({required List<String> urls, String? saveDirectory, Map<String, dynamic>? headers, dynamic onProgress(String url, int received, int total)?}) → Future<List<DownloadResult>>
Download multiple files in parallel
downloadVideo({required String url, String? savePath, String? filename, Map<String, dynamic>? headers, dynamic onProgress(int received, int total)?}) → Future<DownloadResult>
Download video
isDownloadActive(String url) → bool
Check if download is active
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