toJson method

Map<String, dynamic> toJson()

Returns a Map representation of the OptimizationRouteStep object. The keys of the Map are 'type', 'location', 'arrival', 'duration', 'id', 'service', 'waiting_time', 'job' and 'load'.

Implementation

Map<String, dynamic> toJson() => <String, dynamic>{
      'type': type,
      'location': location.toList(),
      'arrival': arrival,
      'duration': duration,
      'id': id,
      'service': service,
      'waiting_time': waitingTime,
      'job': job,
      'load': load,
    }..removeWhere((String _, dynamic value) => value == null);