discoveryUnavailableReason property

String? get discoveryUnavailableReason

Why peer discovery is unavailable, or null when it works.

events carries the same news as PeerDiscoveryUnavailable and PeerDiscoveryRestored, but a transport reports its first failure while it starts — inside open, before any caller can subscribe — so that one reaches nobody. This is the state behind those events, readable at any time. Check it once after opening; listen to events for later changes.

Implementation

String? get discoveryUnavailableReason => _discoveryUnavailableReason;