dispatchInterstitialEvent function
Calls the listener callback for an interstitial event. Returns whether
the event is one of PrebidInterstitialAdListener's.
Implementation
bool dispatchInterstitialEvent(
PrebidInterstitialAdListener? listener,
String event,
Map? args,
) {
switch (event) {
case 'onAdLoaded':
listener?.onAdLoaded?.call();
case 'onAdFailed':
listener?.onAdFailed?.call(adEventError(args));
case 'onAdDisplayed':
listener?.onAdDisplayed?.call();
case 'onAdClosed':
listener?.onAdClosed?.call();
case 'onAdClicked':
listener?.onAdClicked?.call();
case 'onAdExpired':
listener?.onAdExpired?.call();
case 'onAdImpression':
listener?.onAdImpression?.call();
default:
return false;
}
return true;
}