toJson method
Implementation
Map<String, dynamic> toJson() {
final data = <String, dynamic>{};
if (this.TMCs != null) {
data['TMCs'] = this.TMCs?.map((v) => v.toJson()).toList();
}
data['action'] = this.action;
data['assistantAction'] = this.assistantAction;
data['distance'] = this.distance;
data['duration'] = this.duration;
data['instruction'] = this.instruction;
data['orientation'] = this.orientation;
if (this.polyline != null) {
data['polyline'] = this.polyline?.map((v) => v.toJson()).toList();
}
data['road'] = this.road;
if (this.routeSearchCityList != null) {
data['routeSearchCityList'] = this.routeSearchCityList?.map((v) => v.toJson()).toList();
}
data['tollDistance'] = this.tollDistance;
data['tollRoad'] = this.tollRoad;
data['tolls'] = this.tolls;
return data;
}