tracelet_platform_interface library
The platform interface for the Tracelet background geolocation plugin.
This package provides the abstract TraceletPlatform class that platform implementations must extend, along with shared type definitions and the default PigeonTracelet implementation.
Classes
- AdaptiveContext
- Contextual data used by AdaptiveSamplingEngine to compute the optimal distance filter for each location fix.
- AdaptiveSamplingEngine
- Calculates optimal distance filters based on multi-factor context.
- AdaptiveSamplingResult
- Result of an adaptive sampling computation.
- BatteryBudgetEngine
- Pure-Dart battery budget engine.
- BudgetAdjustmentEvent
- Event emitted when the battery budget engine adjusts tracking parameters.
- CarbonEstimator
- Accumulates distance per transport mode during a trip and computes CO₂ emissions using configurable emission factors.
- DeltaEncoder
- Encodes a batch of location maps into delta-compressed format.
- GeofenceEvaluator
- Pure-Dart high-accuracy geofence proximity evaluator.
- GeofenceTransition
- A single geofence state transition detected by GeofenceEvaluator.
- GeoUtils
- Pure-Dart geospatial utility functions.
- KalmanLocationFilter
- 2D Extended Kalman Filter for GPS coordinate smoothing.
- LocationProcessor
- Pure-Dart location filtering engine.
- LocationProcessorResult
- Result of processing a location through LocationProcessor.
- MethodChannelTracelet
- A TraceletPlatform implementation that uses MethodChannel and EventChannels.
- PersistDecider
- Pure-Dart persistence decision logic.
- PigeonEventReceiver
- Implements TraceletEventApi and routes each Pigeon callback into a broadcast StreamController.
- PigeonTracelet
- A TraceletPlatform implementation backed by Pigeon-generated code.
-
RTree<
T> - R-tree spatial index for efficient geofence proximity queries.
- RTreeBBox
- Axis-aligned bounding box for R-tree nodes.
- ScheduleParser
- Pure-Dart schedule parsing and matching.
- ScheduleWindow
- A parsed schedule window.
- TlActivity
- Activity classification.
- TlActivityChangeEvent
- Activity change event data.
- TlAuthorizationEvent
- Authorization / token-refresh event data.
- TlBattery
- Battery info sub-message.
- TlConnectivityChangeEvent
- Connectivity change event data.
- TlCoords
- Coordinates sub-message within a location.
- TlCurrentPositionOptions
- Options for getCurrentPosition.
- TlGeofence
- A geofence definition.
- TlGeofenceEvent
- Geofence event fired on transitions.
- TlGeofencesChangeEvent
- Change in the set of actively monitored geofences.
- TlHeartbeatEvent
- Heartbeat event data (periodic location check-in).
- TlHttpEvent
- HTTP sync event.
- TlLocation
- A location fix returned from the native platform.
- TlProviderChangeEvent
- Provider change event (GPS/network/authorization state).
- TlState
- Plugin state returned by ready/start/stop/getState.
- TraceletEventApi
- Type-safe event channel replacement.
- TraceletEvents
- EventChannel path constants for Tracelet.
- TraceletFlutterApi
- TraceletHostApi
- TraceletPlatform
- The interface that platform implementations of Tracelet must extend.
- TripCarbonSummary
- Per-trip carbon summary emitted when a trip ends.
- 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.
- AdaptiveSource
- Which factor was the primary driver of the adaptive calculation.
- AuthorizationStatus
- Authorization status for location permissions.
- DesiredAccuracy
- Desired accuracy levels for location requests.
- GeofenceAction
- Geofence transition actions.
- HashAlgorithm
- Hash algorithms for the audit trail chain.
- 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.
- LocationOrder
- Sort order for location queries.
- LogLevel
- Log levels for the Tracelet logger.
- MockDetectionLevel
- Controls the aggressiveness of mock/spoofed location detection.
- NotificationPriority
- Android notification priority levels for the foreground service.
- PersistMode
- Which record types to persist to the local database.
- TlAuthorizationStatus
- Authorization status for location permissions.
- TlDesiredAccuracy
- Desired accuracy level for location requests.
- TlGeofenceAction
- Geofence transition action.
- TlHttpMethod
- HTTP method for sync.
- TlTrackingMode
- Tracking mode.
- TrackingMode
- Tracking modes.
Constants
-
kDefaultEmissionFactors
→ const Map<
String, double> - Default CO₂ emission factors (gCO₂/km) based on EU EEA 2024 averages.
Functions
-
wrapResponse(
{Object? result, PlatformException? error, bool empty = false}) → List< Object?>