update to server location popup

This commit is contained in:
Mohamed Nouffer
2022-10-30 21:43:29 +05:30
parent 2d9f7a9633
commit d16d97f64f
17 changed files with 700 additions and 241 deletions

View File

@ -113,13 +113,6 @@ class IndexController extends GetxController {
@override
void onInit() {
// if(locations.length == 0){
// LocationService.loadLocations().then((value){
// locations.add(value!);
// //print(value);
// });
// }
_ever = ever(rog_mode, (_) => print("$_ has been changed (ever)"));
if(perfectures.length == 0){
@ -215,7 +208,6 @@ void login(String email, String password, BuildContext context){
else{
switchPage(AppPages.INITIAL);
}
//Get.toNamed(AppPages.INITIAL);
}else{
Get.snackbar(
'failed'.tr,
@ -587,7 +579,6 @@ void login(String email, String password, BuildContext context){
if(rog_mode == 1){
DestinationController destinationController = Get.find<DestinationController>();
print("---- destination index--- ${destinationController.destination_index_data} --------");
}
else {
GeoJsonFeature<GeoJsonMultiPoint> pt = fs as GeoJsonFeature<GeoJsonMultiPoint>;
@ -620,7 +611,6 @@ void login(String email, String password, BuildContext context){
if(rog_mode == 1){
DestinationController destinationController = Get.find<DestinationController>();
print("---- destination index--- ${destinationController.destination_index_data} --------");
}
else {

View File

@ -68,19 +68,23 @@ class IndexPage extends GetView<IndexController> {
child: InkWell(
child:
Obx(() =>
destinationController.isSelected == true ?
destinationController.is_gps_selected == true ?
Padding(
padding: const EdgeInsets.only(right: 10.0, top: 4.0, bottom: 4.0),
child: InkWell(
child: Image(image: AssetImage('assets/images/route3_off.png'), width: 35, height: 35,),
onTap: (){Get.toNamed(AppPages.DESTINATION_MAP);},
onTap: (){
indexController.switchPage(AppPages.TRAVEL);
},
),
) :
Padding(
padding: const EdgeInsets.only(right: 10.0, top: 4.0, bottom: 4.0),
child: InkWell(
child: Image(image: AssetImage('assets/images/route2_on.png'),width: 35, height: 35,),
onTap: (){Get.toNamed(AppPages.DESTINATION_MAP);},
onTap: (){
indexController.switchPage(AppPages.TRAVEL);
},
),
)
)