Abstract base class representing a generic sensor capable of streaming data.
This class defines the interface for all sensors (e.g., Movesense, smartphone IMU). All concrete sensor implementations must extend Sensor and implement its methods to support starting and stopping the accelerometer, gyroscope, and magnetometer.
Example usage:
final sensor = MovesenseSensor();
await sensor.startAccelerometer(100);
// ... collect data ...
await sensor.stopAccelerometer();
- Implementers
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
-
startAccelerometer(
double samplingRate) → Future< Stream< SensorEvent> > -
Starts streaming accelerometer data at the given
samplingRate
(Hz) -
startGyroscope(
double samplingRate) → Future< Stream< SensorEvent> > -
Starts streaming gyroscope data at the given
samplingRate
(Hz). -
startMagnetometer(
double samplingRate) → Future< Stream< SensorEvent> > -
Starts streaming magnetometer data at the given
samplingRate
(Hz). -
stopAccelerometer(
) → Future< void> - Stops streaming accelerometer data.
-
stopGyroscope(
) → Future< void> - Stops streaming gyroscope data.
-
stopMagnetometer(
) → Future< void> - Stops streaming magnetometer data.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited