setEnableHttpDnsRetry method

Future setEnableHttpDnsRetry(
  1. int enableHttpDnsRetry
)

{zh} @brief 对 uploader 实例开启 httpdns 重试功能,取值请指定为 1

Implementation

Future setEnableHttpDnsRetry(int enableHttpDnsRetry) async {
  $a() => ($instance as $p_a.BDImageXUploader).setEnableHttpDnsRetry(
    enableHttpDnsRetry,
  );
  $i() => ($instance as $p_i.BDImageXUploaderClient).setEnableHttpDnsRetry(
    enableHttpDnsRetry != 0,
  );

  if (Platform.isAndroid) {
    return $a();
  } else if (Platform.isIOS) {
    return $i();
  } else {
    throw UnsupportedError(
      'Not Support Platform ${Platform.operatingSystem}',
    );
  }
}