loadNativeAd method

Future<void> loadNativeAd(
  1. NativeAd ad
)

Implementation

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

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