hasProxyPermission static method

Future<bool> hasProxyPermission()

Checks if the app has permission to set system proxy

Returns true if the app has permission, false otherwise

Implementation

static Future<bool> hasProxyPermission() async {
  if (!isSupported) {
    return false;
  }

  try {
    final result = await _channel.invokeMethod('hasProxyPermission');
    return result == true;
  } catch (e) {
    if (kDebugMode) {
      print('Error checking proxy permission: $e');
    }
    return false;
  }
}