loadGoogleInterstitial method
dynamic
loadGoogleInterstitial()
Implementation
loadGoogleInterstitial() async {
return InterstitialAd.load(
adUnitId: (admodel?.isadmobad ?? false)
? admodel?.admobinterstitial ?? ''
: admodel?.interstitial ?? '',
request: const AdRequest(),
adLoadCallback: InterstitialAdLoadCallback(
onAdLoaded: (InterstitialAd interstitialAd) {
_showInterstitialAd(interstitialAd);
},
onAdFailedToLoad: (LoadAdError error) {
print('InterstitialAd failed to load: $error.');
},
));
}