From 64857d8a8b11c40f33386f8f90abe42c60b01b1e Mon Sep 17 00:00:00 2001 From: Mohamed Nouffer Date: Tue, 4 Jul 2023 11:18:27 +0530 Subject: [PATCH] changed permission dialog --- lib/pages/permission/permission.dart | 23 ++++++++++++----------- lib/services/auth_service.dart | 2 +- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/lib/pages/permission/permission.dart b/lib/pages/permission/permission.dart index 307e1ac..744e2f2 100644 --- a/lib/pages/permission/permission.dart +++ b/lib/pages/permission/permission.dart @@ -87,17 +87,18 @@ class _PermissionHandlerScreenState extends State { ].request(); if (statuses[Permission.location]!.isPermanentlyDenied) { - await openAppSettings().then( - (value) async { - if (value) { - if (await Permission.location.status.isPermanentlyDenied == true && - await Permission.location.status.isGranted == false) { - // openAppSettings(); - permissionServiceCall(); /* opens app settings until permission is granted */ - } - } - }, - ); + _showMyDialog(); + // await openAppSettings().then( + // (value) async { + // if (value) { + // if (await Permission.location.status.isPermanentlyDenied == true && + // await Permission.location.status.isGranted == false) { + // // openAppSettings(); + // permissionServiceCall(); /* opens app settings until permission is granted */ + // } + // } + // }, + // ); } else { if (statuses[Permission.location]!.isDenied) { permissionServiceCall(); diff --git a/lib/services/auth_service.dart b/lib/services/auth_service.dart index 3e31372..ac0facb 100644 --- a/lib/services/auth_service.dart +++ b/lib/services/auth_service.dart @@ -70,7 +70,7 @@ class AuthService{ 'password': password }), ); - + print(response.body); if (response.statusCode == 200) { cats = json.decode(utf8.decode(response.bodyBytes)); }