loadNativeMediumAdTurbo method
Future<void>
loadNativeMediumAdTurbo({
- 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,
- dynamic onAdFailedToLoad(
- Ad ad,
- LoadAdError error
- AdEventCallback? onAdOpened,
- AdEventCallback? onAdWillDismissScreen,
- AdEventCallback? onAdClosed,
- AdEventCallback? onAdImpression,
- AdEventCallback? onAdClicked,
- OnPaidEventCallback? onPaidEvent,
- NativeAdOptions? nativeAdOptions,
- dynamic onNativeAdClicked(
- NativeAd ad
Implementation
Future<void> loadNativeMediumAdTurbo(
{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 {
nativeAdMedium = NativeAd(
adUnitId: adUnitId,
customOptions: customOptions,
nativeAdOptions: nativeAdOptions,
factoryId: 'adTurboNativeMedium',
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),
);
nativeAdMedium.load();
}