update to 3.13

This commit is contained in:
Mohamed Nouffer
2023-09-03 23:37:41 +05:30
parent c41dde4c33
commit 56e9861c7a
60 changed files with 3111 additions and 2705 deletions

View File

@ -18,7 +18,7 @@ class MatrixService{
int i = 0;
for(Destination d in destinations){
print("---- getting matrix for ${d} ------------");
print("---- getting matrix for $d ------------");
if(i==0){
origin = "${d.lat}, ${d.lon}";
@ -37,24 +37,24 @@ class MatrixService{
i++;
}
locs = "optimize:false|${locs}";
locs = "optimize:false|$locs";
String _mode = "walking";
String mode = "walking";
switch (destinationController.travelMode.value) {
case 1:
_mode = "driving";
mode = "driving";
break;
case 2:
_mode = "transit";
mode = "transit";
break;
default:
_mode = "walking";
mode = "walking";
break;
}
Map<String, dynamic> cats = {};
String url = "https://maps.googleapis.com/maps/api/directions/json?destination=${destination}&mode=${_mode}&waypoints=${locs}&origin=${origin}&key=AIzaSyAUBI1ablMKuJwGj2-kSuEhvYxvB1A-mOE";
print('++++++++${url}');
String url = "https://maps.googleapis.com/maps/api/directions/json?destination=$destination&mode=$mode&waypoints=$locs&origin=$origin&key=AIzaSyAUBI1ablMKuJwGj2-kSuEhvYxvB1A-mOE";
print('++++++++$url');
final http.Response response = await http.get(
Uri.parse(url),
headers: <String, String>{