createHttpClient property

CreateHttpClient? createHttpClient
getter/setter pair

createHttpClient: () { // Don't trust any certificate just because their root cert is trusted. final client = HttpClient(context: SecurityContext(withTrustedRoots: false)); // You can test the intermediate / root cert here. We just ignore it. client.badCertificateCallback = (cert, host, port) => true; // Config the client. client.findProxy = (uri) { // Forward all request to proxy "localhost:8888". // Be aware, the proxy should went through you running device, // not the host platform. return "PROXY localhost:8888"; }; return client; },

Implementation

CreateHttpClient? createHttpClient;