onStateChanged property

  1. @override
Stream<FlutterVpnState> onStateChanged
override

Receive state change from VPN service.

Can only be listened once. If have more than one subscription, only the last subscription can receive events.

Implementation

@override
Stream<FlutterVpnState> get onStateChanged => eventChannel
    .receiveBroadcastStream()
    .map((e) => FlutterVpnState.values[e]);