Baseflow / Baseflow/flutter-permission-handler

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

Open
#1,471 0 comments 1 reaction 0 assignees View on GitHub
P2 platform: windows type: enhancement
Dominant language
Dart
Stars
2.2k
Forks
970
Avg merge
14h 22m
Merged PRs (30d)
2

Description

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

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

### Please select affected platform(s)

- [x] 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](https://github.com/flutter/flutter/pull/137040) 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

Code sample

```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

```console
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
```

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.