FlutterBackgroundLocation class

Public API for background location tracking. Use configure, then initialize, then startTracking / stopTracking.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearAllLocations() → Future<void>
Delete all stored location records.
configure(BackgroundLocationConfig config) → Future<void>
Set configuration. Call before initialize or startTracking.
getLastLocation() → Future<LocationRecord?>
Get the most recent location record, if any.
getLocations({int? limit, int? sinceTimestamp, String? sessionId}) → Future<List<LocationRecord>>
Get stored locations with optional filters.
initialize() → Future<void>
Create database and run retention/cleanup. Call before first startTracking.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
runCleanup() → Future<void>
Run retention/maxRecords cleanup manually.
startTracking() → Future<void>
Start foreground location tracking. Generates a new session id.
stopTracking() → Future<void>
Stop foreground location tracking.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

instance → FlutterBackgroundLocation
Singleton instance for the plugin API.
no setter