flutter-permission-handler
flutter-permission-handler copied to clipboard
[Bug]:Lock the screen when the address permission is enabled,PlatformException(ERROR_ALREADY_REQUESTING_PERMISSIONS, A request for permissions is already running, please wait for it to finish before doing another request (note that you can request multiple permissions at the same time)., null, null)
Please check the following before submitting a new issue.
- [X] I have searched the existing issues.
- [X] I have carefully read the documentation and verified I have added the required platform specific configuration.
Please select affected platform(s)
- [ ] Android
- [X] iOS
- [ ] Windows
Steps to reproduce
1、Request address permission 2、Lock screen 3、Request address permission
Expected results
The address permission dialog box is displayed
Actual results
PlatformException(ERROR_ALREADY_REQUESTING_PERMISSIONS, A request for permissions is already running, please wait for it to finish before doing another request (note that you can request multiple permissions at the same time)., null, null)
Code sample
Code sample
static openStore(
BuildContext context,
) async {
Permission.location.status.then((value) {
if (value == PermissionStatus.granted) {
openStorePage(context, 0);
} else if (value == PermissionStatus.denied) {
Permission.location.request().then((value) {
if (value == PermissionStatus.granted) {
openStorePage(context, 0);
} else {
openStorePage(context, 2);
}
});
AndroidUtil.clearFlagSecure();
} else if (value == PermissionStatus.permanentlyDenied || value == PermissionStatus.restricted) {
openStorePage(context, 1);
} else {
if (Platform.isAndroid) {
Permission.location.request().then((value) {
if (value == PermissionStatus.granted) {
openStorePage(context, 0);
} else {
openStorePage(context, 1);
}
});
AndroidUtil.clearFlagSecure();
}
}
});
}
Screenshots or video
Screenshots or video demonstration
[Upload media here]
Version
11.0.1
Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.10.6, on macOS 14.0 23A344 darwin-x64, locale zh-Hans-CN)
• Flutter version 3.10.6 on channel stable at /Applications/flutter3.10.6
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision f468f3366c (6 months ago), 2023-07-12 15:19:05 -0700
• Engine revision cdbeda788a
• Dart version 3.0.6
• DevTools version 2.23.1
• Pub download mirror https://pub.flutter-io.cn
• Flutter download mirror https://storage.flutter-io.cn
same same
The same issue is happening with android.
Any update?
Any update?
getting the same issue in Android and iOS both.
PlatformException(PermissionHandler.PermissionManager, A request for permissions is already running, please wait for it to finish before doing another request (note that you can request multiple permissions at the same time)., null, null).