ios_native_sensors library

Classes

AttitudeEvent
GravityEvent
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.
MagneticEvent
MagnetometerEvent
A sensor sample from a magnetometer.
MotionEvent
RotationRateEvent
Discrete reading from a gyroscope. Gyroscopes measure the rate or rotation of the device in 3D space.
SensorInterval
SensorsPlatform
The common platform interface for sensors.
SensorVector
UserAccelerationEvent
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<GravityEvent>
A broadcast stream of events from the device accelerometer.
no setter
gyroscopeEvents Stream<RotationRateEvent>
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
motionEvents Stream<MotionEvent>
Events from the device accelerometer with gravity removed.
no setter

Functions

accelerometerEventStream({Duration samplingPeriod = SensorInterval.normalInterval}) Stream<GravityEvent>
Returns a broadcast stream of events from the device accelerometer at the given sampling frequency.
gyroscopeEventStream({Duration samplingPeriod = SensorInterval.normalInterval}) Stream<RotationRateEvent>
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.
motionEventStream({Duration samplingPeriod = SensorInterval.normalInterval}) Stream<MotionEvent>
Returns a broadcast stream of events from the device accelerometer with gravity removed at the given sampling frequency.