RotationSensor class

Provides access to the device's rotation sensor, offering a real-time stream of the device's orientation.

This class allows applications to retrieve a stream of OrientationEvents which include the device's orientation represented as a rotation matrix, quaternion, and Euler angles (azimuth, pitch, roll).

Annotations
  • @sealed

Constructors

RotationSensor()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

coordinateSystem CoordinateSystem
The coordinateSystem used for upcoming OrientationEvent.
getter/setter pair
isPlatformSupported bool
Determines whether the current platform is supported.
no setter
orientationStream Stream<OrientationEvent>
A broadcast Stream of OrientationEvents which emits events containing the orientation of the device from the device's rotation sensor.
no setter
samplingPeriod Duration
The samplingPeriod for the device's rotation sensor. The events may arrive at a rate faster or slower than the samplingPeriod, which is only a hint to the system. The actual rate depends on the system's event queue and sensor hardware capabilities.
getter/setter pair