extensionStreamHasListener top-level property Null safety

bool extensionStreamHasListener

Whether the "Extension" stream currently has at least one listener.

A client of the VM service can register as a listener on the extension stream using listenStream method. The extension stream has a listener while at least one such client has registered as a listener, and has not yet disconnected again.

Calling postEvent while the stream has listeners will attempt to deliver that event to all current listeners, although a listener can disconnect before the event is delivered. Calling postEvent when the stream has no listener means that no-one will receive the event, and the call is effectively a no-op.


@pragma("vm:recognized", "other")
external bool get extensionStreamHasListener;