toJson method
Returns a Map representation of the OptimizationSummary object. The keys of the Map are 'cost', 'unassigned', 'amount', 'delivery', 'pickup', 'service', 'duration', 'waiting_time' and 'computing_times'.
Implementation
Map<String, dynamic> toJson() => {
'cost': cost,
'unassigned': unassigned,
'amount': amount,
'delivery': delivery,
'pickup': pickup,
'service': service,
'duration': duration,
'waiting_time': waitingTime,
'computing_times': computingTimes,
}..removeWhere((key, value) => value == null);