matchingStatus property

Stream<bool>? get matchingStatus

A stream of matching-status changes, or null if AdvancedPublisherOptions.enableMatchingListener was not set when this publisher was declared.

Emits true when the first matching subscriber connects and false when the last one disconnects — canon's own wording is "if last subscriber disconnects or when the first subscriber connects".

Lifetime. Canon binds this listener to the publisher: it runs until the corresponding advanced publisher is dropped. The stream therefore completes when close is called. Its behaviour when the session is closed with this publisher still open is not part of this contract; the same is true of AdvancedSubscriber.missEvents. (Contrast AdvancedSubscriber.detectedPublishers, whose listener canon binds to the session instead.)

Implementation

Stream<bool>? get matchingStatus => _matchingController?.stream;