BannerAd constructor
const
BannerAd({
- Key? key,
- AdBuilder? builder,
- BannerAdController? controller,
- BannerSize size = BannerSize.ADAPTIVE,
- Widget? error,
- Widget? loading,
- String? unitId,
- BannerAdOptions options = const BannerAdOptions(),
- Duration? delayToShow,
- Duration loadTimeout = kDefaultLoadTimeout,
- bool nonPersonalizedAds = kDefaultNonPersonalizedAds,
- bool? useHybridComposition,
- 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);