update to 3.13

This commit is contained in:
Mohamed Nouffer
2023-09-03 23:37:41 +05:30
parent c41dde4c33
commit 56e9861c7a
60 changed files with 3111 additions and 2705 deletions

View File

@ -1,7 +1,6 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:rogapp/pages/destination/destination_controller.dart';
import 'package:rogapp/pages/index/index_controller.dart';
import 'package:rogapp/routes/app_pages.dart';
import 'package:rogapp/services/auth_service.dart';
@ -33,16 +32,16 @@ class DrawerPage extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.all(8.0),
child:
indexController.currentUser.length == 0 ?
Flexible(child: Text("drawer_title".tr, style: TextStyle(color: Colors.black, fontSize: 20),))
indexController.currentUser.isEmpty ?
Flexible(child: Text("drawer_title".tr, style: const TextStyle(color: Colors.black, fontSize: 20),))
:
Text(indexController.currentUser[0]['user']['email'], style: TextStyle(color: Colors.black, fontSize: 20),),
Text(indexController.currentUser[0]['user']['email'], style: const TextStyle(color: Colors.black, fontSize: 20),),
),
)
),
),
Obx(() =>
indexController.currentUser.length == 0 ?
indexController.currentUser.isEmpty ?
ListTile(
leading: const Icon(Icons.login),
title: Text("login".tr),
@ -59,7 +58,7 @@ class DrawerPage extends StatelessWidget {
},
)
),
indexController.currentUser.length > 0 ?
indexController.currentUser.isNotEmpty ?
ListTile(
leading: const Icon(Icons.password),
title: Text("change_password".tr),
@ -67,8 +66,8 @@ class DrawerPage extends StatelessWidget {
Get.toNamed(AppPages.CHANGE_PASSWORD);
},
) :
Container(width: 0, height: 0,),
indexController.currentUser.length == 0 ?
const SizedBox(width: 0, height: 0,),
indexController.currentUser.isEmpty ?
ListTile(
leading: const Icon(Icons.person),
title: Text("sign_up".tr),
@ -76,14 +75,14 @@ class DrawerPage extends StatelessWidget {
Get.toNamed(AppPages.REGISTER);
},
) :
Container(width: 0, height: 0,),
indexController.currentUser.length > 0 ?
const SizedBox(width: 0, height: 0,),
indexController.currentUser.isNotEmpty ?
ListTile(
leading: const Icon(Icons.delete_forever),
title: Text("delete_account".tr),
onTap: (){
String _token = indexController.currentUser[0]['token'];
AuthService.deleteUser(_token).then((value){
String token = indexController.currentUser[0]['token'];
AuthService.deleteUser(token).then((value){
if(value.isNotEmpty){
indexController.logout();
Get.toNamed(AppPages.TRAVEL);
@ -92,7 +91,7 @@ class DrawerPage extends StatelessWidget {
});
},
) :
Container(width: 0, height: 0,),
const SizedBox(width: 0, height: 0,),
// ListTile(
// leading: const Icon(Icons.person),
// title: Text("profile".tr),
@ -108,7 +107,7 @@ class DrawerPage extends StatelessWidget {
// title: Text("point_rank".tr),
// onTap: (){},
// ),
indexController.currentUser.length > 0 ?
indexController.currentUser.isNotEmpty ?
ListTile(
leading: const Icon(Icons.featured_video),
title: Text("rog_web".tr),
@ -116,7 +115,7 @@ class DrawerPage extends StatelessWidget {
_launchURL("https://www.gifuai.net/?page_id=17397");
},
) :
Container(width: 0, height: 0,),
const SizedBox(width: 0, height: 0,),
ListTile(
leading: const Icon(Icons.privacy_tip),
title: Text("privacy".tr),