Skip to content

[Bug]: "either avoid referencing a default implementation via platforms: windows: default_package: permission_handler_windows or create a plugin named permission_handler_window" #1471

@stefan-sherwood

Description

@stefan-sherwood

Please check the following before submitting a new issue.

Please select affected platform(s)

  • Android
  • iOS
  • Windows

Steps to reproduce

import 'package:permission_handler/permission_handler.dart';

await [Permission.bluetooth, Permission.bluetoothConnect, Permission.locationWhenInUse].request();

When I run my app with the above code I get this warning in the Debug Console:

Package permission_handler:windows references permission_handler_windows:windows as the default plugin, but the package does not exist, or is not a plugin package.

Ask the maintainers of permission_handler to either avoid referencing a default implementation via platforms: windows: default_package: permission_handler_windows or create a plugin named permission_handler_windows.

This warning was added to Flutter in July 2024. Here is the relevant change.

My app doesn't even have the Windows platform but adding it doesn't change the error message.

 

### Expected results

No warning

### Actual results

"Package permission_handler:windows references permission_handler_windows:windows as the default plugin, but the package does not exist, or is not a plugin package.

Ask the maintainers of permission_handler to either avoid referencing a default implementation via platforms: windows: default_package: permission_handler_windows or create a plugin named permission_handler_windows."

### Code sample

<details><summary>Code sample</summary>

```dart
import 'package:permission_handler/permission_handler.dart';

await [Permission.bluetooth, Permission.bluetoothConnect, Permission.locationWhenInUse].request();

Screenshots or video

Screenshots or video demonstration

[Upload media here]

Version

12.0.0+1

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.29.2, on Microsoft Windows [Version 10.0.19045.5737], locale en-US)
[√] Windows Version (10 Pro 64-bit, 22H2, 2009)
[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.13.6)
[√] Android Studio (version 2024.3)
[√] VS Code (version 1.99.3)
[√] Connected device (4 available)
[√] Network resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work list.platform: windowsIssue is related to the Windows platformtype: enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions