added travel from current location
This commit is contained in:
@ -695,6 +695,43 @@ class DestinationController extends GetxController {
|
||||
});
|
||||
}
|
||||
|
||||
buildShowDialog(BuildContext context) {
|
||||
return showDialog(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (BuildContext context) {
|
||||
return Center(
|
||||
child: CircularProgressIndicator(),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
void destinationMatrixFromCurrentPoint(List<Destination> points){
|
||||
buildShowDialog(Get.context!);
|
||||
MatrixService.getDestinations(points).then((mat){
|
||||
print(" matrix is ------- ${mat}");
|
||||
matrix = mat;
|
||||
|
||||
try{
|
||||
indexController.routePoints = [];
|
||||
indexController.routePointLenght.value = 0;
|
||||
DestinationService.getDestinationLine(points, matrix)?.then((value){
|
||||
indexController.routePoints = value;
|
||||
indexController.routePointLenght.value = indexController.routePoints.length;
|
||||
Get.toNamed(AppPages.TRAVEL);
|
||||
});
|
||||
destinationCount.value = destinations.length;
|
||||
}
|
||||
catch(_){
|
||||
skip_gps = false;
|
||||
return;
|
||||
}
|
||||
finally{
|
||||
Get.back();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void PopulateDestinations(){
|
||||
print("--------- destination controller populsting destinations ----------- ::::::");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user