callback method
Implementation
callback(TPSplashAdListener listener, String adUnitId, String method,
Map arguments) {
Map adInfo = {};
if (arguments.containsKey("adInfo")) {
adInfo = arguments['adInfo'];
}
Map error = {};
if (arguments.containsKey("adError")) {
error = arguments['adError'];
}
if (method == 'splash_loaded') {
listener.onAdLoaded(adUnitId, adInfo);
} else if (method == 'splash_loadFailed') {
listener.onAdLoadFailed(adUnitId, error);
} else if (method == 'splash_impression') {
listener.onAdImpression(adUnitId, adInfo);
} else if (method == 'splash_showFailed') {
listener.onAdShowFailed(adUnitId, adInfo, error);
} else if (method == 'splash_clicked') {
listener.onAdClicked(adUnitId, adInfo);
} else if (method == 'splash_closed') {
listener.onAdClosed(adUnitId, adInfo);
} else if (method == 'splash_startLoad') {
listener.onAdStartLoad!(adUnitId, adInfo);
} else if (method == 'splash_oneLayerStartLoad') {
listener.oneLayerStartLoad!(adUnitId, adInfo);
} else if (method == 'splash_bidStart') {
listener.onBiddingStart!(adUnitId, adInfo);
} else if (method == 'splash_bidEnd') {
listener.onBiddingEnd!(adUnitId, adInfo, error);
} else if (method == 'splash_isLoading') {
listener.onAdIsLoading!(adUnitId);
} else if (method == 'splash_oneLayerLoaded') {
listener.oneLayerLoaded!(adUnitId, adInfo);
} else if (method == 'splash_oneLayerLoadedFail') {
listener.oneLayerLoadFailed(adUnitId, adInfo, error);
} else if (method == 'splash_allLoaded') {
bool isSuccess = arguments["success"];
listener.onAdAllLoaded!(adUnitId, isSuccess);
} else if (method == 'splash_onZoomOutStart') {
listener.onZoomOutStart!(adUnitId, adInfo);
} else if (method == 'splash_onZoomOutEnd') {
listener.onZoomOutEnd!(adUnitId, adInfo);
} else if (method == 'splash_onSkip') {
listener.onSkip!(adUnitId, adInfo);
} else if (method == 'splash_downloadstart') {
num l = arguments["l"];
num l1 = arguments["l1"];
String s = arguments["s"];
String s1 = arguments["s1"];
listener.onDownloadStart!(adUnitId, l, l1, s, s1);
} else if (method == 'splash_downloadupdate') {
num l = arguments["l"];
num l1 = arguments["l1"];
String s = arguments["s"];
String s1 = arguments["s1"];
int i = arguments["p"];
listener.onDownloadUpdate!(adUnitId, l, l1, s, s1, i);
} else if (method == 'splash_downloadpause') {
num l = arguments["l"];
num l1 = arguments["l1"];
String s = arguments["s"];
String s1 = arguments["s1"];
listener.onDownloadPause!(adUnitId, l, l1, s, s1);
} else if (method == 'splash_downloadfinish') {
num l = arguments["l"];
num l1 = arguments["l1"];
String s = arguments["s"];
String s1 = arguments["s1"];
listener.onDownloadFinish!(adUnitId, l, l1, s, s1);
} else if (method == 'splash_downloadfail') {
num l = arguments["l"];
num l1 = arguments["l1"];
String s = arguments["s"];
String s1 = arguments["s1"];
listener.onDownloadFail!(adUnitId, l, l1, s, s1);
} else if (method == 'splash_downloadinstall') {
num l = arguments["l"];
num l1 = arguments["l1"];
String s = arguments["s"];
String s1 = arguments["s1"];
listener.onInstall!(adUnitId, l, l1, s, s1);
}
}