toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'from': from?.toJson(),
'to': to?.toJson(),
'mode': mode,
'passedByPoints': passedByPoints?.map((it) => it.toJson()).toList(),
'avoidPolygons': avoidPolygons?.map((list) => list.map((it) => it.toJson()).toList()).toList(),
'avoidRoad': avoidRoad,
};
}