DownloadItem class

Constructors

DownloadItem({required int id, required String url, required String finalUrl, required String referrer, required String filename, required bool incognito, required DangerType danger, required String mime, required String startTime, String? endTime, String? estimatedEndTime, required State state, required bool paused, required bool canResume, InterruptReason? error, required double bytesReceived, required double totalBytes, required double fileSize, required bool exists, String? byExtensionId, String? byExtensionName})
DownloadItem.fromJS(DownloadItem _wrapped)

Properties

byExtensionId String?
The identifier for the extension that initiated this download if this download was initiated by an extension. Does not change once it is set.
getter/setter pair
byExtensionName String?
The localized name of the extension that initiated this download if this download was initiated by an extension. May change if the extension changes its name or if the user changes their locale.
getter/setter pair
bytesReceived double
Number of bytes received so far from the host, without considering file compression.
getter/setter pair
canResume bool
True if the download is in progress and paused, or else if it is interrupted and can be resumed starting from where it was interrupted.
getter/setter pair
danger DangerType
Indication of whether this download is thought to be safe or known to be suspicious.
getter/setter pair
endTime String?
The time when the download ended in ISO 8601 format. May be passed directly to the Date constructor: chrome.downloads.search({}, function(items){items.forEach(function(item){if (item.endTime) console.log(new Date(item.endTime))})})
getter/setter pair
error InterruptReason?
Why the download was interrupted. Several kinds of HTTP errors may be grouped under one of the errors beginning with SERVER_. Errors relating to the network begin with NETWORK_, errors relating to the process of writing the file to the file system begin with FILE_, and interruptions initiated by the user begin with USER_.
getter/setter pair
estimatedEndTime String?
Estimated time when the download will complete in ISO 8601 format. May be passed directly to the Date constructor: chrome.downloads.search({}, function(items){items.forEach(function(item){if (item.estimatedEndTime) console.log(new Date(item.estimatedEndTime))})})
getter/setter pair
exists bool
Whether the downloaded file still exists. This information may be out of date because Chrome does not automatically watch for file removal. Call search in order to trigger the check for file existence. When the existence check completes, if the file has been deleted, then an onChanged event will fire. Note that search does not wait for the existence check to finish before returning, so results from search may not accurately reflect the file system. Also, search may be called as often as necessary, but will not check for file existence any more frequently than once every 10 seconds.
getter/setter pair
filename String
Absolute local path.
getter/setter pair
fileSize double
Number of bytes in the whole file post-decompression, or -1 if unknown.
getter/setter pair
finalUrl String
The absolute URL that this download is being made from, after all redirects.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id int
An identifier that is persistent across browser sessions.
getter/setter pair
incognito bool
False if this download is recorded in the history, true if it is not recorded.
getter/setter pair
mime String
The file's MIME type.
getter/setter pair
paused bool
True if the download has stopped reading data from the host, but kept the connection open.
getter/setter pair
referrer String
Absolute URL.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startTime String
The time when the download began in ISO 8601 format. May be passed directly to the Date constructor: chrome.downloads.search({}, function(items){items.forEach(function(item){console.log(new Date(item.startTime))})})
getter/setter pair
state State
Indicates whether the download is progressing, interrupted, or complete.
getter/setter pair
toJS DownloadItem
no setter
totalBytes double
Number of bytes in the whole file, without considering file compression, or -1 if unknown.
getter/setter pair
url String
The absolute URL that this download initiated from, before any redirects.
getter/setter pair

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