onBanner method
横幅广告事件回调
Implementation
void onBanner(IPDEvent event) {
int id = event.viewId;
if (_bannerListenerMap.containsKey(id)) {
Function(IPDEvent)? listener = _bannerListenerMap[id];
listener?.call(event);
if (event.action == IPDEventAction.onAdLoadFailed ||
event.action == IPDEventAction.onAdLoaded ||
event.action == IPDEventAction.onAdShowError ||
event.action == IPDEventAction.onAdClose) {
_bannerListenerMap.remove(id);
}
}
}