update to add resume app from sleep

This commit is contained in:
Mohamed Nouffer
2023-08-16 14:53:32 +05:30
parent 68bf3e9ab3
commit 2ab96cc3d0
51 changed files with 748 additions and 789 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,8 +75,8 @@ 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),
@ -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),