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 ----------- ::::::");
|
||||
|
||||
|
||||
@ -136,7 +136,9 @@ class DestinationMapPage extends StatelessWidget {
|
||||
LatLngBounds bounds = c.bounds!;
|
||||
indexController.currentBound.clear();
|
||||
indexController.currentBound.add(bounds);
|
||||
indexController.loadLocationsBound();
|
||||
if(indexController.currentUser.length <= 0){
|
||||
indexController.loadLocationsBound();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
18
lib/pages/progress/progress.dart
Normal file
18
lib/pages/progress/progress.dart
Normal file
@ -0,0 +1,18 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/src/foundation/key.dart';
|
||||
import 'package:flutter/src/widgets/container.dart';
|
||||
import 'package:flutter/src/widgets/framework.dart';
|
||||
|
||||
class ProgressPage extends StatelessWidget {
|
||||
const ProgressPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
color: Colors.transparent,
|
||||
child: Center(
|
||||
child: CircularProgressIndicator(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user