NativeAd constructor

NativeAd({
  1. Key? key,
  2. String placementId = NativeAd.testPlacementId,
  3. NativeAdListener? listener,
  4. required NativeAdType adType,
  5. NativeBannerAdSize bannerAdSize = NativeBannerAdSize.HEIGHT_50,
  6. double width = double.infinity,
  7. double height = 250,
  8. Color? backgroundColor,
  9. Color? titleColor,
  10. Color? descriptionColor,
  11. Color? labelColor,
  12. Color? buttonColor,
  13. Color? buttonTitleColor,
  14. Color? buttonBorderColor,
  15. bool isMediaCover = false,
  16. bool keepAlive = false,
  17. bool keepExpandedWhileLoading = true,
  18. int expandAnimationDuraion = 0,
})

This widget can be used to display customizable native ads and native banner ads.

Implementation

NativeAd({
  Key? key,
  this.placementId = NativeAd.testPlacementId,
  this.listener,
  required this.adType,
  this.bannerAdSize = NativeBannerAdSize.HEIGHT_50,
  this.width = double.infinity,
  this.height = 250,
  this.backgroundColor,
  this.titleColor,
  this.descriptionColor,
  this.labelColor,
  this.buttonColor,
  this.buttonTitleColor,
  this.buttonBorderColor,
  this.isMediaCover = false,
  this.keepAlive = false,
  this.keepExpandedWhileLoading = true,
  this.expandAnimationDuraion = 0,
}) : super(key: key);