start method

Future<void> start()

Start receiving events about the current location.

This method throws a DBusAccessDeniedException if the GeoClue daemon can't determine the desktop ID of the calling app. In this case use setDesktopId to set this before using.

Implementation

Future<void> start() {
  _propertySubscription ??= _object.propertiesChanged.listen((signal) {
    if (signal.propertiesInterface == kClient) {
      _updateProperties(signal.changedProperties);
    }
  });
  return _object
      .callMethod(kClient, 'Start', [], replySignature: DBusSignature(''))
      .then((_) => _object.getAllProperties(kClient))
      .then(_updateProperties);
}