sensorUpdates method

Future<Stream<SensorEvent>> sensorUpdates({
  1. required int sensorId,
  2. Duration? interval,
})

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.

Implementation

Future<Stream<SensorEvent>> sensorUpdates(
        {required int sensorId, Duration? interval}) =>
    _sensorChannel.sensorUpdates(sensorId: sensorId, interval: interval);