getCallbackStream method

  1. @override
Stream<NimmstaEvent> getCallbackStream()
override

Provides a stream of callback events from the Nimmsta device.

This stream emits instances of NimmstaEvent corresponding to device events.

Implementation

@override
Stream<NimmstaEvent> getCallbackStream() {
  _callbackStream ??=
      _eventChannel.receiveBroadcastStream().map<NimmstaEvent>(_mapToEvent);
  return _callbackStream!;
}