MultiDownloader class

A convenient class wraps all api functions of MultiDownloader plugin

Constructors

MultiDownloader()

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

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

Static Methods

cancel({required String taskId}) Future<Null>
Cancel a given download task
cancelAll() Future<Null>
Cancel all enqueued and running download tasks
enqueue({required String url, required String savedDir, String? fileName, String? image, String? srt, String? name, Map<String, String>? headers, bool showNotification = true, bool openFileFromNotification = true, bool requiresStorageNotLow = true}) Future<String?>
Create a new download task
initialize() Future<Null>
loadTasks() Future<List<DownloadTask>?>
Load all tasks from Sqlite database
loadTasksWithRawQuery({required String query}) Future<List<DownloadTask>?>
Load tasks from Sqlite database with SQL statements
open({required String taskId}) Future<bool>
Open and preview a downloaded file
pause({required String taskId}) Future<Null>
Pause a running download task
registerCallback(DownloadCallback callback) → dynamic
Register a callback to track status and progress of download task
remove({required String taskId, bool shouldDeleteContent = false}) Future<Null>
Delete a download task from DB. If the given task is running, it is canceled as well. If the task is completed and shouldDeleteContent is true, the downloaded file will be deleted.
resume({required String taskId, bool requiresStorageNotLow = true}) Future<String?>
Resume a paused download task
retry({required String taskId, bool requiresStorageNotLow = true}) Future<String?>
Retry a failed download task