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

watchOS implementation of the sensors_plus plugin, streaming accelerometer, user-accelerometer, gyroscope, and magnetometer data from CoreMotion via dart:ffi.

0.1.0 #

First release beyond the generated scaffold.

Breaking

  • Minimum Dart SDK is now 3.1.0, where NativeCallable.listener landed.
  • Behaviour change: a stream now emits exactly one event per CoreMotion sample. It previously emitted one per Dart timer tick, on a clock independent of CoreMotion's — so at the same nominal rate it would re-emit a sample it had already delivered, or skip one entirely. Code that counted events, or relied on that aliasing, will see different results. Timestamps are unaffected.

Changed

  • All four streams — accelerometer, user accelerometer, gyroscope, magnetometer — are pushed from the CoreMotion handler rather than polled. No timer runs. The four share one native callback and fan out on a sensor kind, because the native side holds a single callback pointer.

Fixed

  • Two subscriptions to the same sensor now both work. Fanning out on the sensor kind was not enough: only one emitter was kept per kind, so a second listen on, say, accelerometerEvents replaced the first subscription's emitter and silenced it, and whichever subscription cancelled first stopped the sensor for the other. Each subscription is now its own entry, and a sensor stops only when its last listener cancels.

0.0.1 #

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

Documentation

API reference

Publisher

verified publisherflutterwatch.dev

Weekly Downloads

watchOS implementation of the sensors_plus plugin, streaming accelerometer, user-accelerometer, gyroscope, and magnetometer data from CoreMotion via dart:ffi.

Homepage
Repository (GitHub)
View/report issues

Topics

#watchos #ffi #sensors #coremotion

License

BSD-3-Clause (license)

Dependencies

ffi, flutter, sensors_plus_platform_interface

More

Packages that depend on sensors_plus_watchos

Packages that implement sensors_plus_watchos