toMap method
Converts to a JSON-serializable map.
Implementation
JsonMap toMap() => {
'location': location.toMap(),
if (previousLocation != null)
'previousLocation': previousLocation!.toMap(),
if (displacementMeters != null)
'displacementMeters': displacementMeters,
if (timeSinceLastChange != null)
'timeSinceLastChangeMs': timeSinceLastChange!.inMilliseconds,
'wasTimerTriggered': wasTimerTriggered,
};