update to rog_only

This commit is contained in:
Mohamed Nouffer
2023-06-11 21:03:30 +05:30
parent 08332d45d4
commit 6c8ac75b19
6 changed files with 149 additions and 305 deletions

View File

@ -39,6 +39,8 @@ class IndexController extends GetxController {
List<PointLatLng> routePoints = <PointLatLng>[].obs;
var routePointLenght = 0.obs;
double current_lat = 0.0, current_lon = 0.0;
var is_loading = false.obs;
var is_mapController_loaded = false.obs;
@ -117,6 +119,7 @@ class IndexController extends GetxController {
}
}
@override
void onInit() {
_ever = ever(rog_mode, (_) => print("$_ has been changed (ever)"));
@ -131,7 +134,6 @@ class IndexController extends GetxController {
}
_connectivitySubscription = _connectivity.onConnectivityChanged.listen(_updateConnectionStatus);
super.onInit();
}

View File

@ -25,19 +25,17 @@ class IndexPage extends GetView<IndexController> {
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
indexController.switchPage(AppPages.INITIAL);
return false;
},
onWillPop: () async => false,
child: Scaffold(
//drawer: const DrawerPage(),
appBar: AppBar(
leading: IconButton(
icon: Icon(Icons.arrow_back_ios),
onPressed: (){
indexController.switchPage(AppPages.TRAVEL);
},
),
automaticallyImplyLeading: false,
// leading: IconButton(
// icon: Icon(Icons.arrow_back_ios),
// onPressed: (){
// indexController.switchPage(AppPages.TRAVEL);
// },
// ),
//automaticallyImplyLeading: false,
title: Text("add_location".tr),
actions: [
@ -74,7 +72,7 @@ class IndexPage extends GetView<IndexController> {
child: InkWell(
child: Image(image: AssetImage('assets/images/route3_off.png'), width: 35, height: 35,),
onTap: (){
indexController.switchPage(AppPages.TRAVEL);
//indexController.switchPage(AppPages.TRAVEL);
},
),
) :
@ -83,7 +81,7 @@ class IndexPage extends GetView<IndexController> {
child: InkWell(
child: Image(image: AssetImage('assets/images/route2_on.png'),width: 35, height: 35,),
onTap: (){
indexController.switchPage(AppPages.TRAVEL);
//indexController.switchPage(AppPages.TRAVEL);
},
),
)