removeAdInstance static method

void removeAdInstance(
  1. String key,
  2. String adType
)

Remove specific ad instance by key

key The key to remove adType The type of ad to remove ("native", "rewarded", "interstitial")

Implementation

static void removeAdInstance(String key, String adType) {
  switch (adType.toLowerCase()) {
    case 'native':
      _nativeInventoryMap.remove(key);
      break;
    case 'rewarded':
      _rewardedAdMap.remove(key);
      break;
    case 'interstitial':
      _interstitialAdMap.remove(key);
      break;
  }
}