vpn_check 0.3.0 copy "vpn_check: ^0.3.0" to clipboard
vpn_check: ^0.3.0 copied to clipboard

Plugin used for get vpn active status for Android, iOS and MacOS

vpn_check #

Get vpn active status for Android, iOS and MacOS

Getting Started #

A simple usage example:

import 'package:vpn_check/vpn_check.dart';

final vpnChecker = VPNChecker();
bool isVpnActive = false;

try {
    isVpnActive = await vpnChecker.isVPNEnabled();
} on VPNUnhandledException catch (e) {
    print(e);
}

vpnChecker.vpnActiveStream.listen((isActive) {
  isVpnActive = isActive;
  print('is vpn active: $isActive');
},
  cancelOnError: false,
);

// You can also use widget builder
  ...
  VPNStatusBuilder(
    builder: (BuildContext context, VPNStatus value) {
      return Center(
        child: Text('VPN status: ${value.name}'),
      );
    },
  ),
  ...

Support Platform #

  • ✅ Android
  • ✅ iOS
  • ✅ MacOS

Plans #

  • ❌ Linux
  • ❌ Windows
10
likes
140
points
704
downloads

Publisher

unverified uploader

Weekly Downloads

Plugin used for get vpn active status for Android, iOS and MacOS

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

connectivity_plus, flutter

More

Packages that depend on vpn_check