PayloadConfig class
Which groups of fields end up in the uploaded JSON (and buildPayload).
Everything is on by default; switch a group off to keep the payload small
or to avoid sending data you do not need. latitude, longitude,
accuracy and the timestamps are always present.
This only shapes the upload; the in-app streams still carry every field. To avoid even collecting a signal use the matching switch on LocationConfig (LocationConfig.enableGnssStatus, LocationConfig.enableImu, LocationConfig.readWifiState, LocationConfig.readBattery, BarometerConfig.enabled, MotionConfig.enableActivityRecognition, MockConfig.enabled, IndoorConfig.enabled).
Constructors
- PayloadConfig({bool speed = true, bool bearing = true, bool altitude = true, bool gnss = true, bool imu = true, bool mock = true, bool indoor = true, bool motion = true, bool barometer = true, bool device = true, bool quality = true, bool snap = true})
-
Creates a PayloadConfig.
const
- PayloadConfig.fromMap(Map m)
-
Builds a PayloadConfig from a map; missing keys keep their defaults.
factory
Properties
- altitude → bool
-
altitude,verticalAccuracy,altitudeMsl,altitudeMslAccuracy.final - barometer → bool
-
pressureHpa,baroAltitude,relativeAltitude,floorChange,floor,verticalMotion,verticalSpeed.final - bearing → bool
-
bearing,bearingAccuracy.final - device → bool
-
batteryLevel,isCharging,wifiOn.final - gnss → bool
-
satellites,usedInFix,cn0,hdop,validMeasurements,measurementCn0,pseudorangeRateUncertainty,fullTracking.final - hashCode → int
-
The hash code for this object.
no setterinherited
- imu → bool
-
imuRms,imuSamples.final - indoor → bool
-
indoorScore,indoorLikely,indoorReasons,indoorState.final - mock → bool
-
isMock,mockSuspected,mockScore,mockReasons,developerOptionsEnabled.final - motion → bool
-
motionState,activity,activityConfidence,stationary,driveMode,leavingAnchor,distanceToAnchor,odometer.final - quality → bool
-
quality,ageMs,filtered,rawLatitude,rawLongitude,rawAccuracy,reducedAccuracy,filterDecision.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- snap → bool
-
snappedLatitude,snappedLongitude,snapConfidence(only present when aRoadSnapperproduced them).final - speed → bool
-
speed,speedAccuracy,speedKmh.final
Methods
-
apply(
Map< String, dynamic> payload) → void -
Removes the keys of every disabled group from
payload(in place). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, bool> - Serializes this PayloadConfig to a JSON-friendly map (the format sent to the native side and stored).
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited