BackgroundLocationTracker class

Main class for background location tracking

Constructors

BackgroundLocationTracker()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
isTracking bool
Whether tracking is currently active
no setter
lastLocation LocationData?
Last known location
no setter
onError Stream<String>
Stream of errors
no setter
onLocationUpdate Stream<LocationData>
Stream of location updates
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

checkPermission() Future<LocationPermissionStatus>
Check current permission status
dispose() → void
Dispose resources
getBearingBetween(double startLatitude, double startLongitude, double endLatitude, double endLongitude) double
Get bearing between two locations in degrees
getCurrentLocation({LocationAccuracy accuracy = LocationAccuracy.high, Duration? timeLimit}) Future<LocationData?>
Get current location once
getDistanceBetween(double startLatitude, double startLongitude, double endLatitude, double endLongitude) double
Get distance between two locations in meters
isLocationServiceEnabled() Future<bool>
Check if location services are enabled
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openAppSettings() Future<bool>
Open app settings
openLocationSettings() Future<bool>
Open location settings
requestPermission({bool requestBackgroundPermission = false}) Future<LocationPermissionStatus>
Request location permission
startTracking([LocationSettings? settings]) Future<bool>
Start tracking location
stopTracking() Future<void>
Stop tracking location
toString() String
A string representation of this object.
inherited

Operators

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