Dio设置代理

  Dio dio = new Dio();
  (dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = (client) {
      client.findProxy = (uri) {
        return "172.21.146.85:8888";
      };
      client.badCertificateCallback = (X509Certificate cert, String host, int port) => true;
    };

你可能感兴趣的:(Dio设置代理)