Dart Documentationchrome.downloadsDownloadOptions

DownloadOptions class

class DownloadOptions extends ChromeObject {
 DownloadOptions({String url, String filename, FilenameConflictAction conflictAction, bool saveAs, HttpMethod method, List<HeaderNameValuePair> headers, String body}) {
   if (url != null) this.url = url;
   if (filename != null) this.filename = filename;
   if (conflictAction != null) this.conflictAction = conflictAction;
   if (saveAs != null) this.saveAs = saveAs;
   if (method != null) this.method = method;
   if (headers != null) this.headers = headers;
   if (body != null) this.body = body;
 }
 DownloadOptions.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);

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

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

 FilenameConflictAction get conflictAction => _createFilenameConflictAction(jsProxy['conflictAction']);
 set conflictAction(FilenameConflictAction value) => jsProxy['conflictAction'] = jsify(value);

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

 HttpMethod get method => _createHttpMethod(jsProxy['method']);
 set method(HttpMethod value) => jsProxy['method'] = jsify(value);

 List<HeaderNameValuePair> get headers => listify(jsProxy['headers'], _createHeaderNameValuePair);
 set headers(List<HeaderNameValuePair> value) => jsProxy['headers'] = jsify(value);

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

Extends

ChromeObject > DownloadOptions

Constructors

new DownloadOptions({String url, String filename, FilenameConflictAction conflictAction, bool saveAs, HttpMethod method, List<HeaderNameValuePair> headers, String body}) #

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

docs inherited from ChromeObject
DownloadOptions({String url, String filename, FilenameConflictAction conflictAction, bool saveAs, HttpMethod method, List<HeaderNameValuePair> headers, String body}) {
 if (url != null) this.url = url;
 if (filename != null) this.filename = filename;
 if (conflictAction != null) this.conflictAction = conflictAction;
 if (saveAs != null) this.saveAs = saveAs;
 if (method != null) this.method = method;
 if (headers != null) this.headers = headers;
 if (body != null) this.body = body;
}

new DownloadOptions.fromProxy(JsObject jsProxy) #

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

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

Properties

String body #

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

FilenameConflictAction conflictAction #

FilenameConflictAction get conflictAction => _createFilenameConflictAction(jsProxy['conflictAction']);
set conflictAction(FilenameConflictAction value) => jsProxy['conflictAction'] = jsify(value);

String filename #

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

List<HeaderNameValuePair> headers #

List<HeaderNameValuePair> get headers => listify(jsProxy['headers'], _createHeaderNameValuePair);
set headers(List<HeaderNameValuePair> value) => jsProxy['headers'] = jsify(value);

final jsProxy #

inherited from ChromeObject
final dynamic jsProxy

HttpMethod method #

HttpMethod get method => _createHttpMethod(jsProxy['method']);
set method(HttpMethod value) => jsProxy['method'] = jsify(value);

bool saveAs #

bool get saveAs => jsProxy['saveAs'];
set saveAs(bool value) => jsProxy['saveAs'] = 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();