events property

Taps, button presses, replies and dismissals. Ones that arrived before anyone listened (including the tap that launched the app) are delivered first.

Implementation

static Stream<UNotificationEvent> get events {
  _listen();
  return Stream<UNotificationEvent>.multi((MultiStreamController<UNotificationEvent> sink) {
    for (final UNotificationEvent e in _early) {
      sink.add(e);
    }
    _early.clear();
    final StreamSubscription<UNotificationEvent> sub = _controller.stream.listen(sink.add, onError: sink.addError);
    sink.onCancel = sub.cancel;
  }, isBroadcast: true);
}