You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pointer_lock: declare android, ios, windows and linux so pub.dev lists them #80
pointer_lock 0.4.2 declares only macos under flutter.plugin.platforms. The web is handled by a conditional export, and every other native target already falls through to MethodChannelPointerLock, whose isSupported is false off macOS (pointer_lock_method_channel.dart:28). So at runtime the package already works everywhere: it locks on macOS and on the web, and elsewhere it says it can't.
pub.dev only reads the pubspec, though, so it lists pointer_lock for macOS alone. Every package that depends on it gets the same listing. For voxel_game 0.4.0-dev, pub.dev's report says Android, iOS, Windows and Linux are "blocked by the pointer_lock package", and its platform tags hold platform:macos only. The kit runs on all five and draws touch controls on phones. Its other packages, which don't depend on pointer_lock, are listed for all five.
The ask: declare android, ios, windows and linux with a Dart-only implementation, for example:
PointerLockUnsupported.registerWith() would set PointerLockPlatform.instance to an implementation whose isSupported is false and whose calls are no-ops, the same answers the method channel already gives off macOS. That needs no native code, and once the platforms are declared pub.dev lists them.
I'm happy to open a PR with this and a test, if you'd take one.
Yes, please send the PR. Two things so it lands without a round trip.
The 1.0 branch already declares windows and linux with native plugins (0.5.0, not on pub.dev yet), so the Dart-only PointerLockUnsupported is needed for android and ios only. Open the PR against main and I'll carry it onto the 1.0 branch.
CONTRIBUTING asks for the failing test first. A test that instantiates the unsupported backend and checks that isSupported is false and the calls are no-ops is enough; one that reads the pubspec's platform list would be a nice second.
Thanks for tracing it through voxel_game's pub.dev report.
Activity
docs: KL-028 is asked upstream, and the README says why pub.dev lists…
dzolotov commentedon Oct 9, 2026
Yes, please send the PR. Two things so it lands without a round trip.
The 1.0 branch already declares windows and linux with native plugins (0.5.0, not on pub.dev yet), so the Dart-only PointerLockUnsupported is needed for android and ios only. Open the PR against main and I'll carry it onto the 1.0 branch.
CONTRIBUTING asks for the failing test first. A test that instantiates the unsupported backend and checks that isSupported is false and the calls are no-ops is enough; one that reads the pubspec's platform list would be a nice second.
Thanks for tracing it through voxel_game's pub.dev report.