TPListenerCenter constructor

TPListenerCenter()

Implementation

TPListenerCenter() {
  TradplusSdk.channel.setMethodCallHandler((MethodCall call) async {
    String method = call.method;
    if (method == 'tp_globalAdImpression') {
      globalAdImpressionCallBack(call);
    } else if (method.startsWith("uid2_")) {
      uid2CallBack(call);
    } else if (method.startsWith("tp_")) {//SDK相关
      tpCallBack(call);
    } else if (method.startsWith("native_")) {
      nativeCallBack(call);
    } else if (method.startsWith("interstitial_")) {
      interstitialCallBack(call);
    } else if (method.startsWith("rewardVideo_")) {
      rewardVideoCallBack(call);
    } else if (method.startsWith("banner_")) {
      bannerCallBack(call);
    } else if (method.startsWith("splash_")) {
      splashCallBack(call);
    } else if (method.startsWith("offerwall_")) {
      offerwallCallBack(call);
    } else if (method.startsWith("interactive_")) {
      interActiveCallBack(call);
    } else {
      print("unkown method");
    }
  });
}