toJson method
Converts the instance to a JSON map.
Implementation
Map<String, dynamic> toJson() {
return {
'scoringType': scoringType,
'startTime': startTime,
'startLatitude': startLatitude,
'startLongitude': startLongitude,
'startAddress': startAddress?.toJson(),
'endTime': endTime,
'endLatitude': endLatitude,
'endLongitude': endLongitude,
'endAddress': endAddress?.toJson(),
'scoreStats': scoreStats?.map(
(key, value) => MapEntry(key, value?.toJson()),
),
};
}