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.
Address
A reverse geocoded human-readable address.
AndroidConfig
Android-specific configuration settings.
AppConfig
Shared application lifecycle and scheduling settings.
AttestationConfig
Enterprise — Device integrity attestation configuration.
AttestationToken
Represents an attestation token from the device's integrity API.
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.
BatteryBudgetEngine
Rust-powered battery budget engine.
BudgetAdjustmentEvent
An event generated when the battery budget engine decides to throttle or modify tracking parameters.
CarbonEstimator
Accumulates distance per transport mode during a trip and computes CO₂ emissions using configurable emission factors.
ClassifierConfig
On-device transport-mode classifier (fused accelerometer + GPS speed).
ComplianceReport
GDPR Article 30 / CCPA data processing compliance report.
Config
Top-level compound configuration for Tracelet.
ConnectivityChangeEvent
Event fired when network connectivity changes.
Coords
Geographic coordinates with accuracy metrics.
DeltaEncoder
Encodes a batch of location maps into delta-compressed format.
DeviceInfo
Information about the device.
DrivingEvent
A driving-behavior event emitted by the telematics engine.
ForegroundServiceConfig
Configuration for the Android foreground service notification.
GeoConfig
Shared location accuracy and sampling settings.
Geofence
A geofence definition.
GeofenceConfig
Configuration for geofencing behavior.
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 sync settings.
HttpEvent
Event fired during HTTP sync operations.
ImpactConfig
Crash & fall detection.
ImpactEvent
A crash/fall impact event emitted by the impact detector.
IosConfig
iOS-specific configuration settings.
Location
A recorded location from the native platform.
LocationActivity
Activity recognition data associated with a location.
LocationBattery
Battery state associated with a location.
LocationFilter
GPS filtering and smoothing options.
LogEntry
Represents a background log entry stored in the local SQLite database.
LoggerConfig
Configuration for the plugin's internal logger.
MockHeuristics
Detailed heuristic data from the native mock-location detection engine.
ModeChangeEvent
A fused transport-mode change emitted by the on-device classifier.
MotionConfig
Configuration for motion and activity detection.
PersistenceConfig
Configuration for the local SQLite persistence layer.
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.
RouteContext
Immutable context attached to each location at record time.
RTree<T>
R-tree spatial index for efficient geofence proximity queries.
SecurityConfig
Enterprise — At-rest database encryption configuration.
Sensors
Information about the device's available sensors.
SpeedMotionEvent
Event fired when the speed-based motion state machine transitions between states, or when the underlying tracking mode switches.
SQLQuery
Query parameters for reading stored locations or log entries.
State
The current state of the Tracelet plugin.
SyncBodyContext
Context passed to a custom sync body builder callback.
TelematicsConfig
Driving-behavior (telematics) event detection.
TelematicsRecord
Represents a telematics event (e.g. harsh braking, crash) stored in the database.
Tracelet
Production-grade background geolocation for Flutter.
TripCarbonSummary
Per-trip carbon summary emitted when a trip ends.
TripEvent
Represents a detected trip (start → stop).
TripManager
Rust-powered TripManager.

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.
FullAccuracyStatus
Temporary full accuracy authorization status (iOS 14+).
GeofenceAction
Geofence transition actions.
HashAlgorithm
Hash algorithms for the audit trail chain.
HealthWarning
A diagnostic warning detected by HealthCheck.
HttpMethod
HTTP method for sync.
LocationActivityType
iOS activity type hints for CLLocationManager.
LocationAuthorizationRequest
The location authorization level to request from the user.
LocationFilterPolicy
How the location filter handles rejected locations.
LocationOrderDirection
Sort order for location queries.
LogLevel
Log levels for the Tracelet logger.
MockDetectionLevel
Controls the aggressiveness of mock/spoofed location detection.
MotionAuthorizationStatus
Authorization status for motion & fitness / activity recognition permissions.
MotionDetectionMode
Motion detection strategy.
NotificationAuthorizationStatus
Authorization status for notification permissions.
NotificationPriority
Android notification priority levels for the foreground service.
PersistMode
Which record types to persist to the local database.
PrivacyZoneAction
Defines the behavior when a location falls inside a PrivacyZone.
SpeedMotionState
States of the speed-based motion state machine.
SpeedMotionTrackingMode
Underlying tracking mode reported alongside a SpeedMotionEvent.
StationaryTrackingMode
Tracking mode to use when the speed-based state machine enters the stationary state.
TraceletProfile
Standard configuration profiles for Tracelet.
TrackingMode
Tracking modes.

Extensions

HealthWarningDescription on HealthWarning
Human-readable descriptions for each HealthWarning.