YandexAdsRewardedComponent constructor

YandexAdsRewardedComponent({
  1. Function? onAdLoaded,
  2. Function? onAdFailedToLoad,
  3. Function? onAdFailedToShow,
  4. Function? onImpression,
  5. Function? onAdClicked,
  6. Function? onAdShown,
  7. Function? onAdDismissed,
  8. Function? onRewarded,
  9. required String id,
})

Implementation

YandexAdsRewardedComponent({
  Function? onAdLoaded,
  Function? onAdFailedToLoad,
  Function? onAdFailedToShow,
  Function? onImpression,
  Function? onAdClicked,
  Function? onAdShown,
  Function? onAdDismissed,
  Function? onRewarded,
  required this.id,
}) {
  rewarded = YandexAdsRewarded();

  FlutterYandexAds.addRewarded(
    id,
    YandexAdsRewardedCallbacks(
      onAdLoaded: onAdLoaded,
      onAdFailedToLoad: onAdFailedToLoad,
      onAdFailedToShow: onAdFailedToShow,
      onImpression: onImpression,
      onAdClicked: onAdClicked,
      onAdShown: onAdShown,
      onAdDismissed: onAdDismissed,
      onReward: onRewarded,
    ),
  );

  rewarded.make(id);
}