FlutterDownloader class Null safety

A convenient class wraps all api functions of FlutterDownloader plugin




hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]

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, Map<String, String>? headers, bool showNotification = true, bool openFileFromNotification = true, bool requiresStorageNotLow = true}) Future<String?>
Create a new download task [...]
initialize({bool debug = true}) 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 [...]