Skip to content

[Bug]: Disable location service on Windows, the plugin cannot detect it. #1766

@jiagengArctuition

Description

@jiagengArctuition

Please check the following before submitting a new issue.

Please select affected platform(s)

  • Android
  • iOS
  • Linux
  • macOS
  • Web
  • 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

final serviceEnabled = await Geolocator.isLocationServiceEnabled();

Screenshots or video

Screenshots or video demonstration Image

Version

13.0.4

Flutter Doctor output

Doctor output
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions