sensors_plus library

Classes

AccelerometerEvent
Discrete reading from an accelerometer. Accelerometers measure the velocity of the device. Note that these readings include the effects of gravity. Put simply, you can use accelerometer readings to tell if the device is moving in a particular direction.
GyroscopeEvent
Discrete reading from a gyroscope. Gyroscopes measure the rate or rotation of the device in 3D space.
MagnetometerEvent
A sensor sample from a magnetometer.
SensorInterval
Sensors
The Sensors implementation.
SensorsPlatform
The common platform interface for sensors.
UserAccelerometerEvent
Like AccelerometerEvent, this is a discrete reading from an accelerometer and measures the velocity of the device. However, unlike AccelerometerEvent, this event does not include the effects of gravity.

Properties

accelerometerEvents Stream<AccelerometerEvent>
A broadcast stream of events from the device accelerometer.
no setter
gyroscopeEvents Stream<GyroscopeEvent>
A broadcast stream of events from the device gyroscope.
no setter
magnetometerEvents Stream<MagnetometerEvent>
A broadcast stream of events from the device magnetometer.
no setter
userAccelerometerEvents Stream<UserAccelerometerEvent>
Events from the device accelerometer with gravity removed.
no setter

Functions

accelerometerEventStream({Duration samplingPeriod = SensorInterval.normalInterval}) Stream<AccelerometerEvent>
Returns a broadcast stream of events from the device accelerometer at the given sampling frequency.
gyroscopeEventStream({Duration samplingPeriod = SensorInterval.normalInterval}) Stream<GyroscopeEvent>
Returns a broadcast stream of events from the device gyroscope at the given sampling frequency.
magnetometerEventStream({Duration samplingPeriod = SensorInterval.normalInterval}) Stream<MagnetometerEvent>
Returns a broadcast stream of events from the device magnetometer at the given sampling frequency.
userAccelerometerEventStream({Duration samplingPeriod = SensorInterval.normalInterval}) Stream<UserAccelerometerEvent>
Returns a broadcast stream of events from the device accelerometer with gravity removed at the given sampling frequency.