TrackerConfig class

Configuration for the Background Tracker

Constructors

TrackerConfig({AccuracyMode accuracyMode = AccuracyMode.balanced, double distanceFilter = 10.0, int timeInterval = 10, bool enableAdaptiveTracking = true, int lowBatteryThreshold = 20, bool enableMotionDetection = true, int stationaryTimeout = 300, bool enableActivityRecognition = true, int maxDatabaseSize = 50, int dataRetentionDays = 7, String? syncUrl, Map<String, String>? syncHeaders, int syncBatchSize = 100, int syncInterval = 300})
const
TrackerConfig.fromJson(Map<String, dynamic> json)
Create from JSON
factory

Properties

accuracyMode AccuracyMode
Accuracy mode for location tracking
final
dataRetentionDays int
Number of days to retain location data Default: 7 days
final
distanceFilter double
Minimum distance (in meters) before location update is triggered Default: 10 meters
final
enableActivityRecognition bool
Enable activity recognition (walking, running, driving, etc.) Default: true
final
enableAdaptiveTracking bool
Enable AI-powered adaptive tracking (learns user patterns) Default: true
final
enableMotionDetection bool
Enable motion detection to pause tracking when stationary Default: true
final
hashCode int
The hash code for this object.
no setterinherited
lowBatteryThreshold int
Battery level threshold (%) to switch to low power mode Default: 20%
final
maxDatabaseSize int
Maximum database size in MB Default: 50 MB
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stationaryTimeout int
Time (in seconds) of no motion before pausing tracking Default: 300 seconds (5 minutes)
final
syncBatchSize int
Number of locations to batch in each sync request Default: 100
final
syncHeaders Map<String, String>?
HTTP headers for sync requests (e.g., authentication)
final
syncInterval int
Interval (in seconds) between automatic syncs Default: 300 seconds (5 minutes)
final
syncUrl String?
URL for automatic location sync If null, auto-sync is disabled
final
timeInterval int
Minimum time interval (in seconds) between location updates Default: 10 seconds
final

Methods

copyWith({AccuracyMode? accuracyMode, double? distanceFilter, int? timeInterval, bool? enableAdaptiveTracking, int? lowBatteryThreshold, bool? enableMotionDetection, int? stationaryTimeout, bool? enableActivityRecognition, int? maxDatabaseSize, int? dataRetentionDays, String? syncUrl, Map<String, String>? syncHeaders, int? syncBatchSize, int? syncInterval}) TrackerConfig
Create a copy with modified fields
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Convert to JSON for platform channel communication
toString() String
A string representation of this object.
inherited

Operators

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