nativeCallBack method
Implementation
nativeCallBack(MethodCall call) {
String method = call.method;
var arguments = call.arguments;
String adUnitId = "";
if (arguments.containsKey("adUnitID")) {
adUnitId = arguments["adUnitID"];
}
TPNativeAdListener? callBackListener;
if (adUnitId.isNotEmpty && nativeAdListenerMap.containsKey(adUnitId)) {
callBackListener = nativeAdListenerMap[adUnitId];
} else {
callBackListener = nativeAdListener;
}
if (callBackListener == null) {
print("not any nativeAdListener");
return;
}
TPNativeManager.callback(callBackListener, adUnitId, method, arguments);
}