eSenseEvents property
Stream<ESenseEvent>
get
eSenseEvents
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
Stream<ESenseEvent> get eSenseEvents {
if (!connected) {
throw ESenseException('Not connected to any eSense device.');
}
return _eventStream ??= _eSenseEventChannel.receiveBroadcastStream().map(
(event) => event is Map ? ESenseEvent.fromMap(event) : ESenseEvent());
}