serverState property

  1. @override
Stream<PrivServerInfo?> get serverState
override

Process-wide connection state of the Privileged Server.

A non-null value means a server is connected, null means disconnected. Every new listener immediately receives the current value.

Implementation

@override
Stream<PrivServerInfo?> get serverState => _serverStateStream ??=
    serverStateChannel.receiveBroadcastStream().map((dynamic event) {
      if (event == null) return null;
      return PrivServerInfo.fromMap(event as Map<dynamic, dynamic>);
    });