geolocator_watchos 0.1.0 copy "geolocator_watchos: ^0.1.0" to clipboard
geolocator_watchos: ^0.1.0 copied to clipboard

watchOS implementation of the geolocator plugin, providing position and permission handling from CoreLocation (CLLocationManager) via dart:ffi.

0.1.0 #

First release beyond the generated scaffold.

Breaking

  • pollInterval is gone, replaced by permissionTimeout (default 2 minutes), which bounds the wait for the system permission prompt rather than setting a polling rate.
  • Minimum Dart SDK is now 3.1.0, where NativeCallable.listener landed.

Changed

  • getPositionStream, getCurrentPosition and requestPermission are all pushed from CoreLocation delegate callbacks. No polling remains.
  • Added a locationManagerDidChangeAuthorization: delegate method: the answer to a permission prompt arrives there and nowhere else, so waiting on it is the only way to observe it without polling.
  • didFailWithError now wakes a waiter, which re-checks rather than sitting until its deadline.

Fixed

  • The three callers that can wait concurrently — a position stream, a pending getCurrentPosition, a pending requestPermission — now share one native callback. The native side holds a single callback pointer, so registering per caller let whichever finished first silence the others.
  • The shared NativeCallable is now reused across listen/cancel cycles instead of being discarded when the last waiter left. A NativeCallable is only reclaimed by close(), which is exactly what cannot be called while native might be between reading the pointer and calling it — so the old code leaked one trampoline per cycle for the life of the app. Only the pointer is unregistered now.

0.0.1 #

  • Initial watchOS FFI scaffold generated by flutter-watchos plugin port from geolocator_apple.
0
likes
140
points
198
downloads

Documentation

API reference

Publisher

verified publisherflutterwatch.dev

Weekly Downloads

watchOS implementation of the geolocator plugin, providing position and permission handling from CoreLocation (CLLocationManager) via dart:ffi.

Homepage
Repository (GitHub)
View/report issues

Topics

#watchos #ffi #location #geolocation

License

MIT (license)

Dependencies

ffi, flutter, geolocator_platform_interface

More

Packages that depend on geolocator_watchos

Packages that implement geolocator_watchos