findProxyFromEnvironment method

  1. @override
String findProxyFromEnvironment(
  1. Uri? url,
  2. Map<String, String>? environment
)
override

Resolves the proxy server to be used for HTTP connections.

When this override is installed, this function overrides the behavior of HttpClient.findProxyFromEnvironment.

Implementation

@override
String findProxyFromEnvironment(Uri? url, Map<String, String>? environment) {
  return findProxyFromEnvironmentFn != null
      ? findProxyFromEnvironmentFn!(url, environment!)
      : super.findProxyFromEnvironment(url!, environment);
}