DownloadTask class

Encapsulates all information of a single download task.

This is also the structure of the record saved in the SQLite database.

Constructors

DownloadTask({required String taskId, required DownloadTaskStatus status, required int progress, required String url, required String? filename, required String savedDir, required int timeCreated, required bool allowCellular})
Creates a new DownloadTask.

Properties

allowCellular bool
Whether downloads can use cellular data
final
filename String?
Local file name of the downloaded file.
final
hashCode int
The hash code for this object.
no setteroverride
progress int
Progress between 0 (inclusive) and 100 (inclusive).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
savedDir String
Absolute path to the directory where the downloaded file will saved.
final
status DownloadTaskStatus
Status of this task.
final
taskId String
Unique identifier of this task.
final
timeCreated int
Timestamp when the task was created.
final
url String
URL from which the file is downloaded.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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