Dart Documentationchrome.locationLocation

Location class

Parameter of onLocationUpdate event's listener.

class Location extends ChromeObject {
 Location({String name, Coordinates coords, num timestamp}) {
   if (name != null) this.name = name;
   if (coords != null) this.coords = coords;
   if (timestamp != null) this.timestamp = timestamp;
 }
 Location.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);

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

 Coordinates get coords => _createCoordinates(jsProxy['coords']);
 set coords(Coordinates value) => jsProxy['coords'] = jsify(value);

 num get timestamp => jsProxy['timestamp'];
 set timestamp(num value) => jsProxy['timestamp'] = jsify(value);
}

Extends

ChromeObject > Location

Constructors

new Location({String name, Coordinates coords, num timestamp}) #

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

docs inherited from ChromeObject
Location({String name, Coordinates coords, num timestamp}) {
 if (name != null) this.name = name;
 if (coords != null) this.coords = coords;
 if (timestamp != null) this.timestamp = timestamp;
}

new Location.fromProxy(JsObject jsProxy) #

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

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

Properties

Coordinates coords #

Coordinates get coords => _createCoordinates(jsProxy['coords']);
set coords(Coordinates value) => jsProxy['coords'] = jsify(value);

final jsProxy #

inherited from ChromeObject
final dynamic jsProxy

String name #

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

num timestamp #

num get timestamp => jsProxy['timestamp'];
set timestamp(num value) => jsProxy['timestamp'] = jsify(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();