toMap method
Implementation
JsonMap toMap() => {
'tripId': tripId,
'createdAt': createdAt.toIso8601String(),
if (startedAt != null) 'startedAt': startedAt!.toIso8601String(),
if (startLocation != null) 'startLocation': startLocation!.toMap(),
if (lastLocation != null) 'lastLocation': lastLocation!.toMap(),
'distanceMeters': distanceMeters,
'idleSeconds': idleSeconds,
'maxSpeedKph': maxSpeedKph,
'started': started,
'ended': ended,
};