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(); ].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();

View File

@ -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));
} }