loadBannerAd method

Future<void> loadBannerAd(
  1. BannerAd ad
)

Implementation

Future<void> loadBannerAd(BannerAd ad) {
  if (adIdFor(ad) != null) {
    return Future<void>.value();
  }

  final int adId = _nextAdId++;
  _loadedAds[adId] = ad;
  return channel.invokeMethod<void>(
    'loadBannerAd',
    <String, dynamic>{
      'adId': adId,
      'licenseKey': ad.licenseKey,
      'request': ad.request,
      'size': ad.size,
    },
  );
}