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
- 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.
- 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.
- 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.
- RustLib
- Main entrypoint of the Rust API
- ScheduleParser
- Rust-powered schedule parsing and matching.
- ScheduleWindow
- A parsed schedule window representing active days and times.
- TlActivity
- TlActivityChangeEvent
- TlAddress
- TlAndroidConfig
- TlAppConfig
- TlAttestationConfig
- TlAuditConfig
- TlAuthorizationEvent
- TlBattery
- TlClassifierConfig
-
On-device transport-mode classifier config. See
TransportModeClassifier. - TlConfig
- TlConnectivityChangeEvent
- TlCoords
- TlCurrentPositionOptions
- TlDrivingEvent
- A driving-behavior event (harsh brake/accel/cornering/speeding).
- TlForegroundServiceConfig
- TlGeoConfig
- TlGeofence
- TlGeofenceConfig
- TlGeofenceEvent
- TlGeofencesChangeEvent
- TlHeartbeatEvent
- TlHttpConfig
- TlHttpEvent
- TlImpactConfig
-
Crash & fall detection config. See
ImpactDetector. - TlImpactEvent
-
A crash/fall impact event (
potential_crash/crash/potential_fall/fall). - TlIosConfig
- TlLocation
- TlLocationFilter
- TlLogEntry
- TlLoggerConfig
- TlModeChangeEvent
- A fused transport-mode change.
- TlMotionConfig
- TlPersistenceConfig
- TlPrivacyZoneConfig
- TlProviderChangeEvent
- TlSecurityConfig
- TlSpeedMotionEvent
- TlState
- TlTelematicsConfig
-
Driving-behavior (telematics) event detection config. See
TelematicsEngine. - TlTelematicsRecord
- TraceletEventApi
- 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
- Rust-powered TripManager.
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.
- FullAccuracyStatus
- Temporary full accuracy authorization status (iOS 14+).
- 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.
- 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.
- 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.
- TlAuthorizationRequest
- TlAuthorizationStatus
- TlDesiredAccuracy
- TlGeofenceAction
- TlHashAlgorithm
- TlHttpMethod
- TlIosActivityType
- TlLocationActivityType
- TlLocationFilterPolicy
- TlLocationOrderDirection
- TlLogLevel
- TlMotionAuthorizationStatus
- TlMotionDetectionMode
- TlNotificationAuthorizationStatus
- TlNotificationPriority
- TlPersistMode
- TlSpeedMotionState
- TlStationaryTrackingMode
- TlTrackingMode
- TrackingMode
- Tracking modes.
Constants
-
kDefaultEmissionFactors
→ const Map<
String, double> - Default CO₂ emission factors (gCO₂/km) based on EU EEA 2024 averages.
Functions
-
initializeRustLib(
) → Future< void> - Initializes the Rust core library.
-
tryLoadRustCore(
) → bool - Unsupported fallback for loading the Rust core.
-
wrapResponse(
{Object? result, PlatformException? error, bool empty = false}) → List< Object?>