HardwareSensors class
Constructors
Properties
-
accelerometer
→ Stream<
AccelerometerEvent> -
A broadcast stream of events from the device accelerometer.
no setter
- accelerometerUpdateInterval ← int
-
The update interval of accelerometer. The units are in microseconds.
no getter
-
gravity
→ Stream<
GravityEvent> -
A broadcast stream of events from the device magnetometer.
no setter
- gravityUpdateInterval ← int
-
The update interval of magnetometer. The units are in microseconds.
no getter
-
gyroscope
→ Stream<
GyroscopeEvent> -
A broadcast stream of events from the device gyroscope.
no setter
- gyroscopeUpdateInterval ← int
-
The update interval of Gyroscope. The units are in microseconds.
no getter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
isAccelerometerAvailable(
) → Future< bool> - Determines whether accelerometer is available.
-
isGravityAvailable(
) → Future< bool> - Determines whether magnetometer is available.
-
isGyroscopeAvailable(
) → Future< bool> - Determines whether gyroscope is available.
-
isSensorAvailable(
int sensorType) → Future< bool> - Determines whether sensor is available.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setSensorUpdateInterval(
int sensorType, int interval) → Future - Change the update interval of sensor. The units are in microseconds.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- TYPE_ACCELEROMETER → const int
- TYPE_GRAVITY → const int
- TYPE_GYROSCOPE → const int