I want to Disabled Admob Ads After User Purchase the Package for Remove Ads with Help in-app Purchase. I want to Remove Interstitial Ads and Rewarded Ads, Below is the Code for Interstitial and Rewarded Ads:
InterstitialAd myInterstitial = InterstitialAd(
adUnitId: Platform.isIOS ? ios_ads : android_ads,
listener: (MobileAdEvent event) {
print("InterstitialAd event is $event");
},
);
myInterstitial
..load()
..show(
anchorType: AnchorType.bottom,
anchorOffset: 0.0,
);
Rewarded Ad
RewardedVideoAd.instance.listener =
(RewardedVideoAdEvent event, {String rewardType, int rewardAmount}) {
if (event == RewardedVideoAdEvent.rewarded) {
}
};
RewardedVideoAd.instance.load(adUnitId: Platform.isIOS ? ios_ads : android_ads,
targetingInfo: targetingInfo).then((v){
print("log "+v.toString());
if(v){
RewardedVideoAd.instance.show();
}
});