BannerAd constructor

const BannerAd({
  1. Key? key,
  2. AdBuilder? builder,
  3. BannerAdController? controller,
  4. BannerSize size = BannerSize.ADAPTIVE,
  5. Widget? error,
  6. Widget? loading,
  7. String? unitId,
  8. BannerAdOptions options = const BannerAdOptions(),
  9. Duration? delayToShow,
  10. Duration loadTimeout = kDefaultLoadTimeout,
  11. bool nonPersonalizedAds = kDefaultNonPersonalizedAds,
  12. bool? useHybridComposition,
  13. List<String> keywords = const [],
})

Creates a new Banner Ad. size can NOT be null. If so, an AssertionError is thrown

For more info, read the documentation

Implementation

const BannerAd({
  Key? key,
  this.builder,
  this.controller,
  this.size = BannerSize.ADAPTIVE,
  this.error,
  this.loading,
  this.unitId,
  this.options = const BannerAdOptions(),
  this.delayToShow,
  this.loadTimeout = kDefaultLoadTimeout,
  this.nonPersonalizedAds = kDefaultNonPersonalizedAds,
  this.useHybridComposition,
  this.keywords = const [],
}) : super(key: key);