NativeAd constructor
const
NativeAd({
- Key? key,
- required AdLayoutBuilder buildLayout,
- AdTextView? advertiser,
- AdTextView? attribution,
- AdTextView? body,
- AdButtonView? button,
- AdTextView? headline,
- AdImageView? icon,
- AdMediaView? media,
- AdTextView? price,
- AdRatingBarView? ratingBar,
- AdTextView? store,
- NativeAdController? controller,
- String? unitId,
- Widget? error,
- Widget? loading,
- double? height,
- double? width,
- NativeAdOptions? options,
- bool reloadWhenOptionsChange = true,
- AdBuilder? builder,
- Duration? delayToShow,
- Duration? loadTimeout,
- bool? useHybridComposition,
- bool? nonPersonalizedAds,
- List<
String> keywords = const [],
Creates a NativeAd
.
Uses NativeAdView
on android and GADNativeAd
on iOS
Useful links:
- https://developers.google.com/admob/ios/native/start
- https://developers.google.com/admob/android/native/start
- https://github.com/bdlukaa/native_admob_flutter/wiki/Creating-a-native-ad
For more info, read the documentation
Implementation
const NativeAd({
Key? key,
required this.buildLayout,
this.advertiser,
this.attribution,
this.body,
this.button,
this.headline,
this.icon,
this.media,
this.price,
this.ratingBar,
this.store,
this.controller,
this.unitId,
this.error,
this.loading,
this.height,
this.width,
this.options,
this.reloadWhenOptionsChange = true,
this.builder,
this.delayToShow,
this.loadTimeout,
this.useHybridComposition,
this.nonPersonalizedAds,
this.keywords = const [],
}) : super(key: key);