currentState property

  1. @override
Future<FlutterVpnState> get currentState
override

Get current state.

Implementation

@override
Future<FlutterVpnState> get currentState async {
  final state = await methodChannel.invokeMethod<int>('getCurrentState');
  assert(state != null, 'Received a null state from `getCurrentState` call.');
  return FlutterVpnState.values[state!];
}