LocationServiceImpl class

Implementation of LocationService using method channel.

Implemented types

Constructors

LocationServiceImpl(LocusInterface _instanceProvider())
Creates a location service with the given Locus interface provider.

Properties

hashCode int
The hash code for this object.
no setterinherited
heartbeats Stream<Location>
Stream of heartbeat locations (periodic updates when stationary).
no setteroverride
motionChanges Stream<Location>
Stream of motion changes (moving/stationary transitions).
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<Location>
Stream of location updates.
no setteroverride

Methods

changePace(bool isMoving) Future<bool>
Changes the motion state (moving/stationary).
override
destroyLocations() Future<bool>
Destroys all stored locations.
override
getCurrentPosition({int? samples, int? timeout, int? maximumAge, bool? persist, int? desiredAccuracy, JsonMap? extras}) Future<Location>
Gets the current position.
override
getLocations({int? limit}) Future<List<Location>>
Gets stored locations.
override
getSummary({DateTime? date, LocationQuery? query}) Future<LocationSummary>
Gets a summary of location history.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onHeartbeat(void callback(Location), {Function? onError}) StreamSubscription<Location>
Subscribes to heartbeat events.
override
onLocation(void callback(Location), {Function? onError}) StreamSubscription<Location>
Subscribes to location updates.
override
onMotionChange(void callback(Location), {Function? onError}) StreamSubscription<Location>
Subscribes to motion change events.
override
query(LocationQuery query) Future<List<Location>>
Queries stored locations with filtering and pagination.
override
setOdometer(double value) Future<double>
Sets the odometer value.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited