statusEventSink property
Stream<EmpaticaStatusEvent> ?
get
statusEventSink
Implementation
Stream<EmpaticaStatusEvent>? get statusEventSink {
_statusEventSink = _statusEventChannel
.receiveBroadcastStream()
.map((event) => EmpaticaStatusEvent.fromMap(event));
_statusEventSink?.listen((event) {
if (event.runtimeType == UpdateStatus) {
status = (event as UpdateStatus).status;
}
});
return _statusEventSink;
}