loadAndShowRewardAd method

  1. @override
void loadAndShowRewardAd({
  1. AdModuleWithCallBacks? adModuleCallBacks,
})
override

Implementation

@override
void loadAndShowRewardAd({AdModuleWithCallBacks? adModuleCallBacks}) {
  loadRewardAd(
    adModuleCallBacks: AdModuleWithCallBacks(
      onAdLoaded: () {
        if (adModuleCallBacks != null) {
          if (adModuleCallBacks.onAdLoaded != null) {
            adModuleCallBacks.onAdLoaded!();
          }
        }
        showRewardAd(
          adModuleCallBacks: adModuleCallBacks,
        );
      },
      onAdStarted: adModuleCallBacks?.onAdStarted,
      onFailed: adModuleCallBacks?.onFailed,
      onLoadFailed: adModuleCallBacks?.onLoadFailed,
      onRewardSkip: adModuleCallBacks?.onRewardSkip,
      onCloseEvent: adModuleCallBacks?.onCloseEvent,
    ),
  );
}