setupSDK method

Future<bool> setupSDK(
  1. String? writeKey,
  2. String? oneTargetAppPushID, {
  3. bool isShowLog = false,
  4. bool isEnableIAM = true,
  5. dynamic onLog(
    1. String msg
    )?,
  6. int? maxNumberApiPolling,
  7. int env = envProd,
})

Implementation

Future<bool> setupSDK(
  String? writeKey,
  String? oneTargetAppPushID, {
  bool isShowLog = false,
  bool isEnableIAM = true,
  Function(String msg)? onLog,
  int? maxNumberApiPolling,
  int env = envProd,
}) async {
  if (env != envDev && env != envStag && env != envProd) {
    return false;
  }
  this.onLog = onLog;
  return await _channel.invokeMethod(
        Const.setupTracking,
        {
          "env": env,
          "writeKey": writeKey,
          "oneTargetAppPushID": oneTargetAppPushID,
          "isShowLog": isShowLog,
          "isEnableIAM": isEnableIAM,
          "maxNumberApiPolling": maxNumberApiPolling,
        },
      ) ==
      true;
}