changed permission dialog

This commit is contained in:
Mohamed Nouffer
2023-07-04 11:18:27 +05:30
parent bfb238323b
commit 64857d8a8b
2 changed files with 13 additions and 12 deletions

View File

@ -87,17 +87,18 @@ class _PermissionHandlerScreenState extends State<PermissionHandlerScreen> {
].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();

View File

@ -70,7 +70,7 @@ class AuthService{
'password': password
}),
);
print(response.body);
if (response.statusCode == 200) {
cats = json.decode(utf8.decode(response.bodyBytes));
}