我想禁用广告后,用户购买的包,以删除帮助在应用程序内的广告。我想删除中间广告和奖励广告,下面是国际广告和奖励广告的代码:
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,
);奖励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();
}
});发布于 2020-09-04 13:12:48
有一个布尔值来跟踪支付是否是为了删除广告。如果此布尔值设置为true,则不要调用ads代码。
if(!isPaymentDone){
// code to show ads
}https://stackoverflow.com/questions/60600118
复制相似问题