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