setBannerListener method

dynamic setBannerListener(
  1. TPBannerAdListener listener, {
  2. String adUnitId = "",
})

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

Implementation

setBannerListener(TPBannerAdListener listener, {String adUnitId = ""}) {
  if (adUnitId.isNotEmpty) {
    TPListenerManager.bannerAdListenerMap[adUnitId] = listener;
  } else {
    TPListenerManager.bannerAdListener = listener;
  }
}