Using flutter and this plugin (https://pub.dartlang.org/packages/firebase_admob),
How can I check if the Rewarded video is load?
I received this Exception :
PlatformException(ad_not_loaded, show failed for rewarded video, no ad was loaded, null)
but i can't capture it.
Thank you.
You need to use the await keyword
void showRewardedAd() async {
try {
await RewardedVideoAd.instance.load(
adUnitId: RewardedVideoAd.testAdUnitId, targetingInfo: targetingInfo);
await RewardedVideoAd.instance.show();
} on PlatformException catch (e) {
print(e.message);
}
}
and on your listener method add below lines
if (event == RewardedVideoAdEvent.loaded) {
setState(() {
isRewardADLoaded = true;
});
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With