checkVPNConnectivity method

Future<ConnectivityState> checkVPNConnectivity()

only supported on iOS and macOS

Implementation

Future<ConnectivityState> checkVPNConnectivity() async {
  List<ConnectivityResult> results = await _platform.checkConnectivity();
  if (results.contains(ConnectivityResult.vpn)) {
    return ConnectivityState.vpn;
  }
  if (results.contains(ConnectivityResult.other)) {
    return ConnectivityState.unknown;
  }
  return ConnectivityState.none;
}