eSenseEvents property
Get the stream of events from the eSense device, once connected.
Throws an ESenseException if not connected to an eSense device. Wait until connected before using this stream.
Implementation
static Stream<ESenseEvent> get eSenseEvents {
if (!connected) throw ESenseException('Not connected to any eSense device.');
if (_eSenseEventStream == null) {
_eSenseEventStream = _eSenseEventChannel.receiveBroadcastStream().map((event) => ESenseEvent.fromMap(event));
}
return _eSenseEventStream;
}