update for travelmode change bug fixes

This commit is contained in:
Mohamed Nouffer
2022-07-10 23:50:43 +05:30
parent ce105a6754
commit 264cd828f4
9 changed files with 121 additions and 62 deletions

View File

@ -67,8 +67,12 @@ class DestinationService{
static Future<List<PointLatLng>>? getDestinationLine(List<Destination> destinations) async{
PolylinePoints polylinePoints = PolylinePoints();
if(destinations.length <= 0){
return [];
}
print("##### @@@@@ ${destinations[0].lat}");
//print("##### @@@@@ ${destinations[0].lat}");
PointLatLng origin = PointLatLng(destinations[0].lat!, destinations[0].lon!);
PointLatLng dest = PointLatLng(destinations[destinations.length -1].lat!, destinations[destinations.length -1].lon!);