update to routing

This commit is contained in:
Mohamed Nouffer
2022-09-29 15:32:33 +05:30
parent 0ca322e278
commit 0470e1f27f
11 changed files with 120 additions and 70 deletions

View File

@ -46,7 +46,7 @@ class DestinationController extends GetxController {
void getRoutePoints() {
indexController.routePoints = [];
indexController.routePointLenght.value = 0;
DestinationService.getDestinationLine(destinations)?.then((value){
DestinationService.getDestinationLine(destinations, matrix)?.then((value){
indexController.routePoints = value;
indexController.routePointLenght.value = indexController.routePoints.length;
});
@ -272,8 +272,8 @@ class DestinationController extends GetxController {
print("--------- destination controller populsting destinations ----------- ::::::");
DatabaseHelper db = DatabaseHelper.instance;
destinations.clear();
db.getDestinations().then((value){
destinations.clear();
destinationCount.value = 0;
for(Destination d in value){
for(Destination s in currentSelectedDestinations){

View File

@ -105,17 +105,17 @@ class DestnationPage extends StatelessWidget {
Get.back();
},
),
ListTile(
selected: destinationController.travelMode == 2 ? true : false,
selectedTileColor: Colors.amber.shade200,
leading: Image(image: AssetImage('assets/images/p4_10_train.png'),),
title: Text("transit".tr),
onTap:(){
destinationController.travelMode.value = 2;
destinationController.PopulateDestinations();
Get.back();
},
),
// ListTile(
// selected: destinationController.travelMode == 2 ? true : false,
// selectedTileColor: Colors.amber.shade200,
// leading: Image(image: AssetImage('assets/images/p4_10_train.png'),),
// title: Text("transit".tr),
// onTap:(){
// destinationController.travelMode.value = 2;
// destinationController.PopulateDestinations();
// Get.back();
// },
// ),
],
),

View File

@ -305,7 +305,7 @@ void login(String email, String password, BuildContext context){
void loadAreaFor(String perf){
areas.clear();
dynamic initVal = {'id':'-1', 'adm2_ja':'----'};
dynamic initVal = {'id':'-1', 'area_nm':'----'};
PerfectureService.loadGifuAreas(perf).then((value){
value!.add(initVal);
areas.add(value);