changed permission dialog
This commit is contained in:
@ -87,17 +87,18 @@ class _PermissionHandlerScreenState extends State<PermissionHandlerScreen> {
|
|||||||
].request();
|
].request();
|
||||||
|
|
||||||
if (statuses[Permission.location]!.isPermanentlyDenied) {
|
if (statuses[Permission.location]!.isPermanentlyDenied) {
|
||||||
await openAppSettings().then(
|
_showMyDialog();
|
||||||
(value) async {
|
// await openAppSettings().then(
|
||||||
if (value) {
|
// (value) async {
|
||||||
if (await Permission.location.status.isPermanentlyDenied == true &&
|
// if (value) {
|
||||||
await Permission.location.status.isGranted == false) {
|
// if (await Permission.location.status.isPermanentlyDenied == true &&
|
||||||
// openAppSettings();
|
// await Permission.location.status.isGranted == false) {
|
||||||
permissionServiceCall(); /* opens app settings until permission is granted */
|
// // openAppSettings();
|
||||||
}
|
// permissionServiceCall(); /* opens app settings until permission is granted */
|
||||||
}
|
// }
|
||||||
},
|
// }
|
||||||
);
|
// },
|
||||||
|
// );
|
||||||
} else {
|
} else {
|
||||||
if (statuses[Permission.location]!.isDenied) {
|
if (statuses[Permission.location]!.isDenied) {
|
||||||
permissionServiceCall();
|
permissionServiceCall();
|
||||||
|
|||||||
@ -70,7 +70,7 @@ class AuthService{
|
|||||||
'password': password
|
'password': password
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
print(response.body);
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
cats = json.decode(utf8.decode(response.bodyBytes));
|
cats = json.decode(utf8.decode(response.bodyBytes));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user