Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: If you flush the permission dialog, it returns LocationPermission.deniedForever #1476

Open
3 of 8 tasks
Evoswork opened this issue Apr 5, 2024 · 1 comment
Open
3 of 8 tasks
Assignees

Comments

@Evoswork
Copy link

Evoswork commented Apr 5, 2024

Please check the following before submitting a new issue.

Please select affected platform(s)

  • Android
  • iOS
  • Linux
  • macOS
  • Web
  • Windows

Steps to reproduce

  1. Call Geolocator.requestPermission()
  2. Flush the dialog

Expected results

LocationPermission.denied

Actual results

LocationPermission.deniedForever

Code sample

Code sample
final LocationPermission permission = await Geolocator.requestPermission();
print('permission $permission');

Screenshots or video

Screenshots or video demonstration

[Upload media here]

Version

11.0.0

Flutter Doctor output

Doctor output

[✓] Flutter (Channel stable, 3.19.5, on macOS 14.4.1 23E224 darwin-x64, locale ru-RU)
• Flutter version 3.19.5 on channel stable at /Users/evg/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 300451adae (8 days ago), 2024-03-27 21:54:07 -0500
• Engine revision e76c956498
• Dart version 3.3.3
• DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/evg/Library/Android/sdk
• Platform android-34-ext8, build-tools 34.0.0
• ANDROID_HOME = /Users/evg/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15E204a
• CocoaPods version 1.13.0

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

[✓] IntelliJ IDEA Community Edition (version 2023.3.5)
• IntelliJ at /Users/evg/Applications/IntelliJ IDEA Community Edition.app
• Flutter plugin version 78.3.1
• Dart plugin version 233.14888

[✓] VS Code (version 1.86.1)
• VS Code at /Users/evg/Downloads/Visual Studio Code.app/Contents
• Flutter extension can be installed from:
🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

@Evoswork
Copy link
Author

Evoswork commented Apr 5, 2024

test() async{
    final LocationPermission permission = await Geolocator.requestPermission();
    print('permission $permission');
    print('permission ${await Geolocator.checkPermission()}');
}

print1 = LocationPermission.deniedForever
print2 = LocationPermission.denied

@mvanbeusekom mvanbeusekom self-assigned this Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants