Stream<Geoposition> watchPosition(
{bool enableHighAccuracy,
Duration timeout,
Duration maximumAge}
)

Not documented.

Source

@DomName('Geolocation.watchPosition')
Stream<Geoposition> watchPosition({bool enableHighAccuracy,
    Duration timeout, Duration maximumAge}) {

  var options = {};
  if (enableHighAccuracy != null) {
    options['enableHighAccuracy'] = enableHighAccuracy;
  }
  if (timeout != null) {
    options['timeout'] = timeout.inMilliseconds;
  }
  if (maximumAge != null) {
    options['maximumAge'] = maximumAge.inMilliseconds;
  }

  int watchId;
  var controller;
  controller = new StreamController<Geoposition>(sync: true,
    onListen: () {
      assert(watchId == null);
      watchId = _watchPosition(
          (position) {
            controller.add(_ensurePosition(position));
          },
          (error) {
            controller.addError(error);
          },
          options);
    },
    onCancel: () {
      assert(watchId != null);
      _clearWatch(watchId);
    });

  return controller.stream;
}