init method

void init(
  1. String host,
  2. String port, {
  3. String? proxy,
  4. OnRequestStart? onStart,
  5. bool debug = true,
  6. bool printParams = true,
})

初始化服务器地址和端口

Implementation

void init(String host, String port, {String? proxy, OnRequestStart? onStart, bool debug = true,bool printParams = true}) {
  _print = debug;
  _showParams = printParams;
  _ip = host;
  _port = port;
  if (proxy != null) _proxy = proxy;
  _onStart = onStart;
}