tracelet library

Tracelet — Production-grade background geolocation for Flutter.

Battery-conscious motion-detection intelligence, geofencing, SQLite persistence, HTTP sync, and headless Dart execution for iOS & Android.

import 'package:tracelet/tracelet.dart' as tl;

// 1. Listen to events
tl.Tracelet.onLocation((location) => print(location));

// 2. Configure & ready
await tl.Tracelet.ready(tl.Config(
  geo: tl.GeoConfig(distanceFilter: 10),
));

// 3. Start tracking
await tl.Tracelet.start();

Classes

ActivityChangeEvent
Event fired when the detected device activity changes.
AppConfig
Application lifecycle and behavior settings.
AuditConfig
Enterprise — Tamper-proof location audit trail configuration.
AuditProof
A single link in the tamper-proof audit chain.
AuditVerification
Result of verifying the tamper-proof audit trail.
AuthorizationEvent
Event fired when the HTTP Authorization token exchange occurs.
Config
Top-level compound configuration for Tracelet.
ConnectivityChangeEvent
Event fired when network connectivity changes.
Coords
Geographic coordinates with accuracy metrics.
DeviceInfo
Information about the device.
ForegroundServiceConfig
Configuration for the Android foreground service notification.
GeoConfig
Location accuracy and sampling settings.
Geofence
A geofence definition.
GeofenceConfig
Geofencing settings.
GeofenceEvent
Event fired when a geofence transition occurs.
GeofencesChangeEvent
Event fired when the set of active geofences changes.
GeoUtils
Pure-Dart geospatial utility functions.
HeadlessEvent
Event dispatched to the headless (background isolate) callback.
HealthCheck
A single-call diagnostic snapshot of the plugin's operational health.
HeartbeatEvent
Event fired on each heartbeat interval.
HttpConfig
HTTP synchronization settings.
HttpEvent
Event fired during HTTP sync operations.
KalmanLocationFilter
2D Extended Kalman Filter for GPS coordinate smoothing.
Location
A recorded location from the native platform.
LocationActivity
Activity recognition data associated with a location.
LocationBattery
Battery state associated with a location.
LocationFilter
Location filtering and denoising configuration.
LoggerConfig
Logging and debug settings.
MockHeuristics
Detailed heuristic data from the native mock-location detection engine.
MotionConfig
Motion detection settings.
PermissionRationale
Rationale dialog configuration for background location permission.
PersistenceConfig
Data persistence and database retention settings.
PrivacyZone
Enterprise — A geographic zone where location tracking behavior changes.
PrivacyZoneConfig
Enterprise — Configuration for Privacy Zones.
ProviderChangeEvent
Event fired when the location provider state changes.
Sensors
Information about the device's available sensors.
SQLQuery
Query parameters for reading stored locations or log entries.
State
The current state of the Tracelet plugin.
Tracelet
Production-grade background geolocation for Flutter.
TripEvent
Represents a detected trip (start → stop).
TripManager
Tracks trips based on motion state transitions.

Enums

AccuracyAuthorization
Accuracy authorization (iOS 14+).
ActivityConfidence
Confidence level for activity detection.
ActivityType
Activity types detected by the motion detection engine.
AuthorizationStatus
Authorization status for location permissions.
DesiredAccuracy
Desired accuracy levels for location requests.
GeofenceAction
Geofence transition actions.
HealthWarning
A diagnostic warning detected by HealthCheck.
HttpMethod
HTTP method for sync.
LocationActivityType
iOS activity type hints for CLLocationManager.
LocationFilterPolicy
How the location filter handles rejected locations.
LocationOrder
Sort order for location queries.
LogLevel
Log levels for the Tracelet logger.
MockDetectionLevel
Controls the aggressiveness of mock/spoofed location detection.
PersistMode
Which record types to persist to the local database.
PrivacyZoneAction
Defines the behavior when a location falls inside a PrivacyZone.
TrackingMode
Tracking modes.

Extensions

HealthWarningDescription on HealthWarning
Human-readable descriptions for each HealthWarning.