toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = Map<String, dynamic>();
data['restriction'] = this.restriction;
data['polyline'] = this.polyline;
data['distance'] = this.distance;
if (this.steps != null) {
data['steps'] = this.steps!.map((v) => v.toJson()).toList();
}
data['totalTrafficLights'] = this.totalTrafficLights;
data['duration'] = this.duration;
data['strategy'] = this.strategy;
data['tollDistance'] = this.tollDistance;
data['tolls'] = this.tolls;
return data;
}