optimized

This commit is contained in:
Mohamed Nouffer
2023-10-06 16:25:21 +05:30
parent 7fdb6c05ee
commit 0e2a8f89f3
101 changed files with 50948 additions and 4137 deletions

View File

@ -12,7 +12,7 @@ class DrawerPage extends StatelessWidget {
final IndexController indexController = Get.find<IndexController>();
void _launchURL(url) async {
if (!await launch(url)) throw 'Could not launch $url';
if (!await launchUrl(url)) throw 'Could not launch $url';
}
@override
@ -115,8 +115,8 @@ class DrawerPage extends StatelessWidget {
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);