SensorManager class
Constructors
SensorManager ()
Returns the singleton instance. Builds the instance first if is null.
factory
Properties
hashCode
→ int
The hash code for this object.
no setter inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
Methods
isSensorAvailable (int sensorId )
→ Future <bool >
Checks if the sensorId
is available in the system or supported by the
plugin.
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sensorUpdates ({required int sensorId , Duration ? interval })
→ Future <Stream <SensorEvent > >
Opens a stream to receive sensor updates from the desired sensor
defined in the request
. Returns the future of a stream because
the sensor event channels are dynamically created and must be
registered before returning the stream for each channel.
toString ()
→ String
A string representation of this object.
inherited
updateSensorInterval ({required int sensorId , Duration ? interval })
→ Future
Updates the interval between updates for an specific sensor.