getLocationUpdates static method
Stream<GeoClueLocation>
getLocationUpdates({
- GeoClueManager? manager,
- String? desktopId,
- GeoClueAccuracyLevel? accuracyLevel,
- int? distanceThreshold,
- 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);
}
}