loadNativeSmallAdTurbo method

Future<void> loadNativeSmallAdTurbo({
  1. required String adUnitId,
  2. Map<String, Object>? customOptions,
  3. List<String>? keywords,
  4. String? contentUrl,
  5. List<String>? neighboringContentUrls,
  6. bool? nonPersonalizedAds,
  7. int? httpTimeoutMillis,
  8. String? mediationExtrasIdentifier,
  9. Map<String, String>? extras,
  10. AdEventCallback? onAdLoaded,
  11. dynamic onAdFailedToLoad(
    1. Ad ad,
    2. LoadAdError error
    )?,
  12. AdEventCallback? onAdOpened,
  13. AdEventCallback? onAdWillDismissScreen,
  14. AdEventCallback? onAdClosed,
  15. AdEventCallback? onAdImpression,
  16. AdEventCallback? onAdClicked,
  17. OnPaidEventCallback? onPaidEvent,
  18. NativeAdOptions? nativeAdOptions,
  19. dynamic onNativeAdClicked(
    1. NativeAd ad
    )?,
})

Implementation

Future<void> loadNativeSmallAdTurbo(
    {required String adUnitId,
    Map<String, Object>? customOptions,
    List<String>? keywords,
    String? contentUrl,
    List<String>? neighboringContentUrls,
    bool? nonPersonalizedAds,
    int? httpTimeoutMillis,
    String? mediationExtrasIdentifier,
    Map<String, String>? extras,
    AdEventCallback? onAdLoaded,
    Function(Ad ad, LoadAdError error)? onAdFailedToLoad,
    AdEventCallback? onAdOpened,
    AdEventCallback? onAdWillDismissScreen,
    AdEventCallback? onAdClosed,
    AdEventCallback? onAdImpression,
    AdEventCallback? onAdClicked,
    OnPaidEventCallback? onPaidEvent,
    NativeAdOptions? nativeAdOptions,
    Function(NativeAd ad)? onNativeAdClicked}) async {
  nativeAdSmall = NativeAd(
    adUnitId: adUnitId,
    customOptions: customOptions,
    nativeAdOptions: nativeAdOptions,
    factoryId: 'adTurboNativeSmall',
    request: AdRequest(
        keywords: keywords,
        contentUrl: contentUrl,
        neighboringContentUrls: neighboringContentUrls,
        nonPersonalizedAds: nonPersonalizedAds,
        httpTimeoutMillis: httpTimeoutMillis,
        mediationExtrasIdentifier: mediationExtrasIdentifier,
        extras: extras),
    listener: NativeAdListener(
        onAdOpened: onAdOpened,
        onAdImpression: onAdImpression,
        onAdWillDismissScreen: onAdWillDismissScreen,
        onAdClosed: onAdClosed,
        onPaidEvent: onPaidEvent,
        onAdClicked: onAdClicked,
        onAdLoaded: onAdLoaded,
        onAdFailedToLoad: onAdFailedToLoad),
  );

  nativeAdSmall.load();
}