prepare method

  1. @override
Future<bool> prepare()
override

Prepare for vpn connection. (Android only)

For first connection it will show a dialog to ask for permission. When your connection was interrupted by another VPN connection, you should prepare again before reconnect.

Implementation

@override
Future<bool> prepare() async {
  if (!Platform.isAndroid) return true;
  return (await methodChannel.invokeMethod<bool>('prepare'))!;
}