showRewarded method
Shows the Rewarded ad if available. @param activity The activity from which the Rewarded ad should be shown. @param callback The callback for Rewarded ad events.
Implementation
Future<void> showRewarded(AdCallback? callback) {
if (_rewarded == null) {
callback?.onShowFailed("Not ready");
return Future.value();
}
_rewardedCallback = callback;
return _rewarded!.show();
}