setup method

void setup({
  1. @required String? appKey,
  2. String? channel,
  3. bool? useIDFA,
  4. int timeout = 10000,
  5. bool setControlWifiSwitch = true,
})

初始化, timeout单位毫秒,合法范围是(0,30000],推荐设置为5000-10000,默认值为10000

Implementation

void setup(
    {@required String? appKey,
    String? channel,
    bool? useIDFA,
    int timeout = 10000,
    bool setControlWifiSwitch = true}) {
  print("$flutter_log" + "setup");

  _channel.setMethodCallHandler(_handlerMethod);

  _channel.invokeMethod("setup", {
    "appKey": appKey,
    "channel": channel,
    "useIDFA": useIDFA,
    "timeout": timeout,
    "setControlWifiSwitch": setControlWifiSwitch
  });
}