Baseflow / Baseflow/flutter-geolocator

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

Open
#1,476 2 comments 0 reactions 1 assignee Claimed by @mvanbeusekom View on GitHub
Dominant language
Dart
Stars
1.3k
Forks
803
Avg merge
8h 16m
Merged PRs (30d)
1

Description

### Please check the following before submitting a new issue.

- [x] I have searched the [existing issues](https://github.com/baseflow/flutter-geolocator/issues).
- [X] I have carefully [read the documentation](https://github.com/Baseflow/flutter-geolocator/blob/main/geolocator/README.md) and verified I have added the required platform specific configuration.

### Please select affected platform(s)

- [X] 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.