getSystemProxyForUri method
Implementation
@override
Future<Iterable<ProxyDto>?> getSystemProxyForUri(Uri uri) async {
final jsonProxies = await methodChannel.invokeMethod<String?>(
getSystemProxyForUriMethodName, {"uri": uri.toString()});
if (jsonProxies != null || jsonProxies!.isNotEmpty) {
final Iterable proxies = json.decode(jsonProxies);
List<ProxyDto> desProxies =
List<ProxyDto>.from(proxies.map((model) => ProxyDto.fromJson(model)));
return desProxies;
} else {
return [];
}
}