toJson method
Implementation
Map toJson () => {
'id': id,
'tripState': tripState,
'totalDistance': totalDistance,
'totalDuration': totalDuration,
'totalElevation_gain': totalElevation_gain,
'metadata': metadata,
'user': user?.toJson(),
'startedAt': startedAt,
'endedAt': endedAt,
'createdAt': createdAt,
'updatedAt': updatedAt,
'events': getEventsMapList(events ?? List.empty(growable: true)),
'stops': getStopList(stop ?? List.empty(growable: true)),
'syncStatus': syncStatus,
};