onBanner method

void onBanner(
  1. IosZjEvent event
)

横幅广告事件回调

Implementation

void onBanner(IosZjEvent event) {
  int id = event.viewId;
  if (_bannerListenerMap.containsKey(id)) {
    Function(IosZjEvent)? listener = _bannerListenerMap[id];
    listener?.call(event);
    if (event.action == IosZjEventAction.onAdError ||
        event.action == IosZjEventAction.onAdClose) {
      _bannerListenerMap.remove(id);
    }
  }
}