loadInterAd method

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

Implementation

@override
void loadInterAd({AdModuleWithCallBacks? adModuleCallBacks}) {
  UnityAds.load(
    placementId: GlobalAdVariables.adNetworkIds?['unity']?.interId ?? "",
    onComplete: (placementId) {
      if (adModuleCallBacks != null) {
        if (adModuleCallBacks.onAdLoaded != null) {
          adModuleCallBacks.onAdLoaded!();
        }
      }
    },
    onFailed: (placementId, error, message) {
      print(error.name);
      print(message);
      if (adModuleCallBacks != null) {
        if (adModuleCallBacks.onLoadFailed != null) {
          adModuleCallBacks.onLoadFailed!();
        }
      }
    },
  );
}