Baseflow / Baseflow/flutter-geolocator
[Bug]: Disable location service on Windows, the plugin cannot detect it.
- 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)
- [ ] Android
- [ ] iOS
- [ ] Linux
- [ ] macOS
- [ ] Web
- [x] Windows
### Steps to reproduce
1. Disable location service on Windows system settings
2. call "isLocationServiceEnabled" api
### Expected results
isLocationServiceEnabled return false
### Actual results
isLocationServiceEnabled return true
### Code sample
```dart
final serviceEnabled = await Geolocator.isLocationServiceEnabled();
```
### Screenshots or video
Screenshots or video demonstration
### Version
13.0.4
### Flutter Doctor output
Doctor output
```console
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel stable, 3.27.4, on Microsoft Windows [版本 10.0.26200.7462], locale en-GB)
! Warning: `flutter` on your path resolves to D:\coding\sdk\fvm\versions\3.27.4\bin\flutter,
which is not inside your current Flutter SDK checkout at D:\coding\sdk\fvm\default. Consider
adding D:\coding\sdk\fvm\default\bin to the front of your path.
! Warning: `dart` on your path resolves to D:\coding\sdk\fvm\versions\3.27.4\bin\dart, which is
not inside your current Flutter SDK checkout at D:\coding\sdk\fvm\default. Consider adding
D:\coding\sdk\fvm\default\bin to the front of your path.
[✓] Windows Version (Installed version of Windows is version 10 or higher)
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/to/windows-android-setup for more details.
[✓] Chrome - develop for the web
[✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.13.6)
[✓] Android Studio (version 2021.2)
[✓] Connected device (3 available)
[✓] Network resources
! Doctor found issues in 2 categories.
```
Contributor guide
Research direction
Start by locating the Windows implementation of the Geolocator.isLocationServiceEnabled API and reproduce the issue with Windows location services disabled. Compare the returned value with the system setting, then verify that the API returns false in this state and true when the service is enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- desktop-dev, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100