getLocationUpdates static method

Stream<GeoClueLocation> getLocationUpdates({
  1. GeoClueManager? manager,
  2. String? desktopId,
  3. GeoClueAccuracyLevel? accuracyLevel,
  4. int? distanceThreshold,
  5. int? timeThreshold,
})

Returns a stream of location updates.

Implementation

static Stream<GeoClueLocation> getLocationUpdates({
  GeoClueManager? manager,
  String? desktopId,
  GeoClueAccuracyLevel? accuracyLevel,
  int? distanceThreshold,
  int? timeThreshold,
}) async* {
  final simple = _GeoClueSimple(manager);
  final client = await simple.start(
    desktopId: desktopId,
    accuracyLevel: accuracyLevel,
    distanceThreshold: distanceThreshold,
    timeThreshold: timeThreshold,
  );
  try {
    yield* client.locationUpdated;
  } finally {
    await simple.stop(client);
  }
}