stage method

Future<V2RayStage> stage()

Returns the current V2RayStage by querying the native side.

Implementation

Future<V2RayStage> stage() async {
  try {
    final raw = await _channelControl.invokeMethod<String>('stage');
    return _parseStage(raw ?? 'unknown');
  } catch (_) {
    return V2RayStage.unknown;
  }
}