change modes

This commit is contained in:
Mohamed Nouffer
2022-07-09 22:51:34 +05:30
parent 131a8995e0
commit ce105a6754
22 changed files with 828 additions and 293 deletions

View File

@ -23,8 +23,14 @@ class IndexPage extends GetView<IndexController> {
return Scaffold(
drawer: const DrawerPage(),
appBar: AppBar(
leading: IconButton(
icon: Icon(Icons.arrow_back_ios),
onPressed: (){
indexController.switchPage(AppPages.TRAVEL);
},
),
automaticallyImplyLeading: false,
title: Text("app_title".tr),
title: Text("Add locations"),
actions: [
CatWidget(indexController: indexController,),
],
@ -36,14 +42,7 @@ class IndexPage extends GetView<IndexController> {
Expanded(child: IconButton(icon: const Icon(Icons.camera_enhance), onPressed: (){},),),
const Expanded(child: Text('')),
Expanded(child: IconButton(icon: const Icon(Icons.travel_explore), onPressed: (){
if(indexController.currentUser.isNotEmpty){
indexController.switchPage(AppPages.TRAVEL);
//Get.toNamed(AppPages.TRAVEL);
}
else{
indexController.switchPage(AppPages.LOGIN);
//Get.toNamed(AppPages.LOGIN);
}
indexController.switchPage(AppPages.TRAVEL);
}),),
],
),
@ -71,12 +70,15 @@ class IndexPage extends GetView<IndexController> {
height: 50.0,
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
child: Obx(() =>
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
BreadCrumbWidget(),
indexController.is_mapController_loaded.value == false ?
Center(child: CircularProgressIndicator())
:
BreadCrumbWidget(mapController: indexController.mapController),
Container(width: 24.0,),
Obx(()=>
Row(
children: [
indexController.currentCat.isNotEmpty ? Text(indexController.currentCat[0].toString()): Text(""),
@ -91,8 +93,8 @@ class IndexPage extends GetView<IndexController> {
Container(width: 0, height: 0,)
],
)
),
],
)
),
),
),