optimized
This commit is contained in:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user