changed permission dialog
This commit is contained in:
@ -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();
|
||||
|
||||
@ -70,7 +70,7 @@ class AuthService{
|
||||
'password': password
|
||||
}),
|
||||
);
|
||||
|
||||
print(response.body);
|
||||
if (response.statusCode == 200) {
|
||||
cats = json.decode(utf8.decode(response.bodyBytes));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user