Dart Documentationchrome.downloadsDownloadItem

DownloadItem class

The state of the process of downloading a file.

class DownloadItem extends ChromeObject {
 DownloadItem({int id, String url, String referrer, String filename, bool incognito, DangerType danger, String mime, String startTime, String endTime, String estimatedEndTime, State state, bool paused, bool canResume, InterruptReason error, int bytesReceived, int totalBytes, int fileSize, bool exists, String byExtensionId, String byExtensionName}) {
   if (id != null) this.id = id;
   if (url != null) this.url = url;
   if (referrer != null) this.referrer = referrer;
   if (filename != null) this.filename = filename;
   if (incognito != null) this.incognito = incognito;
   if (danger != null) this.danger = danger;
   if (mime != null) this.mime = mime;
   if (startTime != null) this.startTime = startTime;
   if (endTime != null) this.endTime = endTime;
   if (estimatedEndTime != null) this.estimatedEndTime = estimatedEndTime;
   if (state != null) this.state = state;
   if (paused != null) this.paused = paused;
   if (canResume != null) this.canResume = canResume;
   if (error != null) this.error = error;
   if (bytesReceived != null) this.bytesReceived = bytesReceived;
   if (totalBytes != null) this.totalBytes = totalBytes;
   if (fileSize != null) this.fileSize = fileSize;
   if (exists != null) this.exists = exists;
   if (byExtensionId != null) this.byExtensionId = byExtensionId;
   if (byExtensionName != null) this.byExtensionName = byExtensionName;
 }
 DownloadItem.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);

 int get id => jsProxy['id'];
 set id(int value) => jsProxy['id'] = value;

 String get url => jsProxy['url'];
 set url(String value) => jsProxy['url'] = value;

 String get referrer => jsProxy['referrer'];
 set referrer(String value) => jsProxy['referrer'] = value;

 String get filename => jsProxy['filename'];
 set filename(String value) => jsProxy['filename'] = value;

 bool get incognito => jsProxy['incognito'];
 set incognito(bool value) => jsProxy['incognito'] = value;

 DangerType get danger => _createDangerType(jsProxy['danger']);
 set danger(DangerType value) => jsProxy['danger'] = jsify(value);

 String get mime => jsProxy['mime'];
 set mime(String value) => jsProxy['mime'] = value;

 String get startTime => jsProxy['startTime'];
 set startTime(String value) => jsProxy['startTime'] = value;

 String get endTime => jsProxy['endTime'];
 set endTime(String value) => jsProxy['endTime'] = value;

 String get estimatedEndTime => jsProxy['estimatedEndTime'];
 set estimatedEndTime(String value) => jsProxy['estimatedEndTime'] = value;

 State get state => _createState(jsProxy['state']);
 set state(State value) => jsProxy['state'] = jsify(value);

 bool get paused => jsProxy['paused'];
 set paused(bool value) => jsProxy['paused'] = value;

 bool get canResume => jsProxy['canResume'];
 set canResume(bool value) => jsProxy['canResume'] = value;

 InterruptReason get error => _createInterruptReason(jsProxy['error']);
 set error(InterruptReason value) => jsProxy['error'] = jsify(value);

 int get bytesReceived => jsProxy['bytesReceived'];
 set bytesReceived(int value) => jsProxy['bytesReceived'] = value;

 int get totalBytes => jsProxy['totalBytes'];
 set totalBytes(int value) => jsProxy['totalBytes'] = value;

 int get fileSize => jsProxy['fileSize'];
 set fileSize(int value) => jsProxy['fileSize'] = value;

 bool get exists => jsProxy['exists'];
 set exists(bool value) => jsProxy['exists'] = value;

 String get byExtensionId => jsProxy['byExtensionId'];
 set byExtensionId(String value) => jsProxy['byExtensionId'] = value;

 String get byExtensionName => jsProxy['byExtensionName'];
 set byExtensionName(String value) => jsProxy['byExtensionName'] = value;
}

Extends

ChromeObject > DownloadItem

Constructors

new DownloadItem({int id, String url, String referrer, String filename, bool incognito, DangerType danger, String mime, String startTime, String endTime, String estimatedEndTime, State state, bool paused, bool canResume, InterruptReason error, int bytesReceived, int totalBytes, int fileSize, bool exists, String byExtensionId, String byExtensionName}) #

Create a new instance of a ChromeObject, which creates and delegates to a JsObject proxy.

docs inherited from ChromeObject
DownloadItem({int id, String url, String referrer, String filename, bool incognito, DangerType danger, String mime, String startTime, String endTime, String estimatedEndTime, State state, bool paused, bool canResume, InterruptReason error, int bytesReceived, int totalBytes, int fileSize, bool exists, String byExtensionId, String byExtensionName}) {
 if (id != null) this.id = id;
 if (url != null) this.url = url;
 if (referrer != null) this.referrer = referrer;
 if (filename != null) this.filename = filename;
 if (incognito != null) this.incognito = incognito;
 if (danger != null) this.danger = danger;
 if (mime != null) this.mime = mime;
 if (startTime != null) this.startTime = startTime;
 if (endTime != null) this.endTime = endTime;
 if (estimatedEndTime != null) this.estimatedEndTime = estimatedEndTime;
 if (state != null) this.state = state;
 if (paused != null) this.paused = paused;
 if (canResume != null) this.canResume = canResume;
 if (error != null) this.error = error;
 if (bytesReceived != null) this.bytesReceived = bytesReceived;
 if (totalBytes != null) this.totalBytes = totalBytes;
 if (fileSize != null) this.fileSize = fileSize;
 if (exists != null) this.exists = exists;
 if (byExtensionId != null) this.byExtensionId = byExtensionId;
 if (byExtensionName != null) this.byExtensionName = byExtensionName;
}

new DownloadItem.fromProxy(JsObject jsProxy) #

Create a new instance of a ChromeObject, which delegates to the given JsObject proxy.

docs inherited from ChromeObject
DownloadItem.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);

Properties

String byExtensionId #

String get byExtensionId => jsProxy['byExtensionId'];
set byExtensionId(String value) => jsProxy['byExtensionId'] = value;

String byExtensionName #

String get byExtensionName => jsProxy['byExtensionName'];
set byExtensionName(String value) => jsProxy['byExtensionName'] = value;

int bytesReceived #

int get bytesReceived => jsProxy['bytesReceived'];
set bytesReceived(int value) => jsProxy['bytesReceived'] = value;

bool canResume #

bool get canResume => jsProxy['canResume'];
set canResume(bool value) => jsProxy['canResume'] = value;

DangerType danger #

DangerType get danger => _createDangerType(jsProxy['danger']);
set danger(DangerType value) => jsProxy['danger'] = jsify(value);

String endTime #

String get endTime => jsProxy['endTime'];
set endTime(String value) => jsProxy['endTime'] = value;

InterruptReason error #

InterruptReason get error => _createInterruptReason(jsProxy['error']);
set error(InterruptReason value) => jsProxy['error'] = jsify(value);

String estimatedEndTime #

String get estimatedEndTime => jsProxy['estimatedEndTime'];
set estimatedEndTime(String value) => jsProxy['estimatedEndTime'] = value;

bool exists #

bool get exists => jsProxy['exists'];
set exists(bool value) => jsProxy['exists'] = value;

String filename #

String get filename => jsProxy['filename'];
set filename(String value) => jsProxy['filename'] = value;

int fileSize #

int get fileSize => jsProxy['fileSize'];
set fileSize(int value) => jsProxy['fileSize'] = value;

int id #

int get id => jsProxy['id'];
set id(int value) => jsProxy['id'] = value;

bool incognito #

bool get incognito => jsProxy['incognito'];
set incognito(bool value) => jsProxy['incognito'] = value;

final jsProxy #

inherited from ChromeObject
final dynamic jsProxy

String mime #

String get mime => jsProxy['mime'];
set mime(String value) => jsProxy['mime'] = value;

bool paused #

bool get paused => jsProxy['paused'];
set paused(bool value) => jsProxy['paused'] = value;

String referrer #

String get referrer => jsProxy['referrer'];
set referrer(String value) => jsProxy['referrer'] = value;

String startTime #

String get startTime => jsProxy['startTime'];
set startTime(String value) => jsProxy['startTime'] = value;

State state #

State get state => _createState(jsProxy['state']);
set state(State value) => jsProxy['state'] = jsify(value);

int totalBytes #

int get totalBytes => jsProxy['totalBytes'];
set totalBytes(int value) => jsProxy['totalBytes'] = value;

String url #

String get url => jsProxy['url'];
set url(String value) => jsProxy['url'] = value;

Methods

JsObject toJs() #

inherited from ChromeObject
JsObject toJs() => jsProxy;

String toString() #

inherited from ChromeObject

Returns a string representation of this object.

docs inherited from Object
String toString() => jsProxy.toString();