show method
void
show({
- required OnUserEarnedRewardCallback onUserEarnedReward,
Implementation
void show({required OnUserEarnedRewardCallback onUserEarnedReward}) {
if (_rewardedInterstitialAd != null) {
_rewardedInterstitialAd!.fullScreenContentCallback =
FullScreenContentCallback(
onAdShowedFullScreenContent: (ad) {},
onAdDismissedFullScreenContent: (ad) {
ad.dispose();
_rewardedInterstitialAd = null;
_loadAds();
},
onAdFailedToShowFullScreenContent: (ad, err) {
ad.dispose();
_rewardedInterstitialAd = null;
_loadAds();
},
);
_rewardedInterstitialAd!.show(onUserEarnedReward: onUserEarnedReward);
_rewardedInterstitialAd = null;
}
}