createHttpClient method
Returns a new HttpClient using the given context
.
When this override is installed, this function overrides the behavior of
new HttpClient
.
Implementation
@override
HttpClient createHttpClient(SecurityContext? context) {
HttpClient hc = HttpClientWrapper(super.createHttpClient(context))
..findProxy = _findProxy
..badCertificateCallback = ((X509Certificate cert, String host, int port) =>
NetworkDebugger.instance.enableProxy.value);
return hc;
}