Closed beersheba closed 2 years ago
There are missing steps in Section 9 (Add a rewarded ad):
_loadRewardedAd() method is not called, should be called at the bottom of initState()
_loadRewardedAd()
initState()
_rewardedAd should be nullable
_rewardedAd
_rewardedAd?.show requires to implement callback onUserEarnedReward: _rewardedAd?.show(onUserEarnedReward: (_, reward) {QuizManager.instance.useHint();},
_rewardedAd?.show
onUserEarnedReward
_rewardedAd?.show(onUserEarnedReward: (_, reward) {QuizManager.instance.useHint();},
Thanks for this - I was really scratching my head.
Authors: How about fixing the tutorial??!!
Done updating the doc. Thanks for reporting!
There are missing steps in Section 9 (Add a rewarded ad):
_loadRewardedAd()
method is not called, should be called at the bottom ofinitState()
_rewardedAd
should be nullable_rewardedAd?.show
requires to implement callbackonUserEarnedReward
:_rewardedAd?.show(onUserEarnedReward: (_, reward) {QuizManager.instance.useHint();},