onEvent property

Stream<SignalEvent> onEvent

Gets a broadcast stream of SignalEvents for this line.

Note that platforms can and do emit events with same SignalEvent.edge in sequence, with no event with different edge between.

So, it often happens that platforms emit events like this: rising, rising, rising, falling, rising, even though that doesn't seem to make any sense at first glance.

Implementation

Stream<SignalEvent> get onEvent => FlutterGpiod.instance._onSignalEvent(_lineHandle);