setNativeAdListener method

dynamic setNativeAdListener(
  1. TPNativeAdListener listener, {
  2. String adUnitId = "",
})

设置广告Listener:adUnitId 设置后只返回指定广告位相关回调(可选)

Implementation

setNativeAdListener(TPNativeAdListener listener, {String adUnitId = ""}) {
  if (adUnitId.isNotEmpty) {
    TPListenerManager.nativeAdListenerMap[adUnitId] = listener;
  } else {
    TPListenerManager.nativeAdListener = listener;
  }
}